Hole card lookup values

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Hole card lookup values

Postby WhiteRider » Sat Sep 13, 2008 6:00 am

In the 'holdem cash hand' section of Custom Reports, you can work with your hole cards.

These are stored in the database as numeric values in fields:
holdem_hand_player_statistics.id_holecard - your pair of cards
holdem_hand_player_detail.holecard_1 - your first hole card
holdem_hand_player_detail.holecard_2 - your second hole card

In PT4 these database fields are:
cash_hand_player_statistics.id_holecard
cash_hand_player_statistics.holecard_1
cash_hand_player_statistics.holecard_2
(The values are the same for PT4)

[When building Statistics, but not in Columns..]
You can convert the numbers into human readable strings using the lookup_from_id Function.
e.g.
lookup_from_id( id_holecard, 'cardpair' ) - e.g. "AA", "KQs", "62o". (note the single quotes round 'cardpair')
lookup_from_id( id_holecard1, 'card' ) - e.g. "As", "Td", "5c".
Also,
lookup_from_id( id_holecard1, 'card_rank' ) - returns a numeric value of the card strength. A=14, K=13, ... 2=2

As a reference guide, the 'cardpair' and 'card' lookup values are as follows:

'cardpair'
AA=1
AKs=2
AKo=3
AQs=4
...
A2o=25
KK=26
KQs=27 .. K2o=48
QQ=49, JJ=70, TT=89, 99=106, 88=121, 77=134, 66=145, 55=154, 44=161, 33=166, 22=169

'card'
2c=1 / 2d=14 / 2h=27 / 2s=40
3c=2 / 3d=15 ...
4c=3
...
Ac=13 / Ad=26 / Ah=39 / As=52


There are some other DB fields related to cards, and the same lookup functions can be used:
holdem_hand_summary.card_1
...
holdem_hand_summary.card_5
..are the board cards.


To check for board cards if you don't know the suit, you can use this kind of filter:
id_flop1 % 13 = 0
..which is the MOD function, and will find any aces (any time the ID divided by 13 leaves a remainder of 0, i.e. 13, 26, 39, 52).

Note: if you search for aces as above it will also count when ID=0 which it is if there is no flop, so you need to check this:
id_flop1 % 13 = 0 AND id_flop1 > 0
WhiteRider
Moderator
 
Posts: 52466
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hole card lookup values

Postby lv8pv » Sat Sep 18, 2010 10:17 am

I know its an old post... but ...

Anyone actually made a tab like this for us to import ? (preferable for tournaments)
lv8pv
 
Posts: 13
Joined: Sat Mar 06, 2010 9:53 am

Re: Hole card lookup values

Postby WhiteRider » Sat Sep 18, 2010 5:38 pm

What exactly are you looking for?
WhiteRider
Moderator
 
Posts: 52466
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hole card lookup values

Postby lv8pv » Mon Sep 20, 2010 5:09 pm

Ah, I was linked to this post from another post, where there was an example on how to create a Hand Range Pop-up on players. The last post on this thread by Kraada: viewtopic.php?f=45&t=11188

So I was wondering if anyone actually did make one, and if it is shared.
lv8pv
 
Posts: 13
Joined: Sat Mar 06, 2010 9:53 am

Re: Hole card lookup values

Postby WhiteRider » Tue Sep 21, 2010 2:41 am

I think that Kraada has that popup but I'm not sure whether it's included in his publically available HUD yet - it generates quite a lot of work for PT3 for a debateable benefit (read his last post). He will no doubt tell you what his plans are for this later.
WhiteRider
Moderator
 
Posts: 52466
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hole card lookup values

Postby kraada » Tue Sep 21, 2010 9:16 am

I did, and I plan on posting it things have just been a bit busy lately. If you PM me your e-mail address, I'll gladly e-mail you the popups, just make sure that your computer is well above our minimum specifications, because it really does make everything work a lot harder.
kraada
Moderator
 
Posts: 54443
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Hole card lookup values

Postby theshark » Sat Oct 22, 2011 8:55 am

this is Beep up. write clear directions to extract the information. I find this program to be great but the support assumes that we know what your talking about when the program is very big. how do i pull the A = ?? K = ??. This is even worst then Linux.
theshark
 
Posts: 9
Joined: Mon Aug 29, 2011 7:12 am

Re: Hole card lookup values

Postby WhiteRider » Sat Oct 22, 2011 1:14 pm

What exactly do you want? Do you want to search for either of the cards being an ace (i.e. when the cardpair is Ax), or do you want to check each hole card individually for being an ace?
Do you want a specific ace (e.g. ace of hearts) or just any ace?

It sounds like you want to find hands containing any ace - in that case you can check for

holdem_hand_player_statistics.id_holecard <= 25

..because cardpairs run from AA=1, through AKs=2, AKo=3, etc, though to A2o=25, as shown in the first post in this thread.
If that's not what you want, please explain in a little more detail.
WhiteRider
Moderator
 
Posts: 52466
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hole card lookup values

Postby jscobie » Sat Oct 22, 2011 2:39 pm

Hi,

Can I please get this pop-up also if I pm you my e-mail address?

Thanks
jscobie
 
Posts: 76
Joined: Sat Apr 30, 2011 10:48 am

Re: Hole card lookup values

Postby WhiteRider » Sat Oct 22, 2011 4:33 pm

I'm sure kraada will be happy to send it to you.
WhiteRider
Moderator
 
Posts: 52466
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 3 guests

cron
highfalutin