Looking up Holecard IDs

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

Looking up Holecard IDs

Postby advis0r » Sat Jan 26, 2008 10:18 am

Hello there,

i tried to adapt my query that looks up allin pots where hero is involved to the pt3 database scheme, but ran into this problem:

holdem_hand_player_detail.holecard_1
holdem_hand_player_detail.holecard_2
Documentation says "First/second holecard identifier. References lookup_hole_cards."

but lookup_hole_cards contains information like K7s, nopair, suited, but no information for the individual card referenced in holecard_1 and 2 ?
advis0r
 
Posts: 137
Joined: Thu Jan 24, 2008 8:39 pm
Location: Southern Germany

Re: Looking up Holecard IDs

Postby Josh » Sat Jan 26, 2008 10:47 am

The documentation is mistaken. Individual hole cards like that reference an array of cards starting, 1 = 2c, 52 = As:

[codeq4r]
1 2 3 4 5 6 7 8 9 10 11 12 13
2c 3c 4c 5c 6c 7c 8c 9c Tc Jc Qc Kc Ac

14 15 16 17 18 19 20 21 22 23 24 25 26
2d 3d 4d 5d 6d 7d 8d 9d Td Jd Qd Kd Ad

27 28 29 30 31 32 33 34 35 36 37 38 39
2h 3h 4h 5h 6h 7h 8h 9h Th Jh Qh Kh Ah

40 41 42 43 44 45 46 47 48 49 50 51 52
2s 3s 4s 5s 6s 7s 8s 9s Ts Js Qs Ks As
[/codeq4r]
Josh
Site Admin
 
Posts: 6222
Joined: Sat Dec 08, 2007 6:03 pm

Re: Looking up Holecard IDs

Postby APerfect10 » Sat Jan 26, 2008 2:35 pm

[quote="Josh"oca]The documentation is mistaken. Individual hole cards like that reference an array of cards starting, 1 = 2c, 52 = As:

[codeoca]
1 2 3 4 5 6 7 8 9 10 11 12 13
2c 3c 4c 5c 6c 7c 8c 9c Tc Jc Qc Kc Ac

14 15 16 17 18 19 20 21 22 23 24 25 26
2d 3d 4d 5d 6d 7d 8d 9d Td Jd Qd Kd Ad

27 28 29 30 31 32 33 34 35 36 37 38 39
2h 3h 4h 5h 6h 7h 8h 9h Th Jh Qh Kh Ah

40 41 42 43 44 45 46 47 48 49 50 51 52
2s 3s 4s 5s 6s 7s 8s 9s Ts Js Qs Ks As
[/codeoca][/quoteoca]

Cough, which SHOULD be in one of the lookup tables...
APerfect10
Site Admin
 
Posts: 4489
Joined: Sat Dec 08, 2007 6:03 pm

Re: Looking up Holecard IDs

Postby advis0r » Sat Jan 26, 2008 2:47 pm

thats was my point ;)
either documentation is wrong or you are missing a lookup table (or UDF)

of course i could convert the values to cards in my external program.
advis0r
 
Posts: 137
Joined: Thu Jan 24, 2008 8:39 pm
Location: Southern Germany

Re: Looking up Holecard IDs

Postby APerfect10 » Sat Jan 26, 2008 4:02 pm

[quote="advis0r"1lx]thats was my point ;)
either documentation is wrong or you are missing a lookup table (or UDF)

of course i could convert the values to cards in my external program.[/quote1lx]

It's a combination of both. There should be a lookup table; however, the lookup table referenced in the documentation is incorrect.

Thanks for pointing this out.

Best regards,

Derek
APerfect10
Site Admin
 
Posts: 4489
Joined: Sat Dec 08, 2007 6:03 pm

Re: Looking up Holecard IDs

Postby Seitz333 » Thu Jun 05, 2008 12:06 pm

Is there going to be a lookup table added so if people want to run a custom query and show the actual card it would be possible? I know i could manually add the table but it should be included in the schema.

Chuck
Seitz333
 
Posts: 71
Joined: Sun Feb 24, 2008 8:14 pm

Re: Looking up Holecard IDs

Postby WhiteRider » Thu Jun 05, 2008 3:38 pm

I think there is one..
e.g. from the Hole 1 stat:
lookup_from_id(id_holecard1, 'card_rank')
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Looking up Holecard IDs

Postby Seitz333 » Fri Jun 06, 2008 12:43 pm

What would the SQL Statement look like?

I can use this SQL Statement but it only gives the numerical value of each hole card and I want it to show the actual card, like 7c Th Ks etc...

Code: Select all
SELECT holecard_1, holecard_2
FROM holdem_hand_player_detail
WHERE holecard_1 > 0 AND holecard_2 > 0


Thanks,

Chuck
Seitz333
 
Posts: 71
Joined: Sun Feb 24, 2008 8:14 pm

Re: Looking up Holecard IDs

Postby Seitz333 » Sun Jun 08, 2008 10:05 pm

Here is a link to another SQL question where I created a custom lookup_table for card values. Hope this helps.

http://www.pokertracker.com/forums/viewtopic.php?f=18&t=7021&p=33941#p33941

Chuck
Seitz333
 
Posts: 71
Joined: Sun Feb 24, 2008 8:14 pm


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

Who is online

Users browsing this forum: No registered users and 0 guests