Values for Card_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

Values for Card_ids

Postby neos2k1 » Sun Feb 22, 2009 1:31 pm

Hi,

I'm having problems relating the card_id (1,3,6,... 52) with the actual card (As, 2c, etc ....).
I can find the tables where the card_id for hole1, hole2, card1, card2, card3 .... but I can't find the table to relate the ID with the card value .

I found this post about card ids [ http://www.pokertracker.com/forums/viewtopic.php?f=18&t=11876#p55492 ]
Unfortunately can't figure out how to use this function: lookup_from_id( id_holecard1, 'card' ) - e.g. "As", "Td", "5c".

Some trivial SQL ...
Code: Select all
Select holecard_1  from holdem_hand_player_detail
where id_player = '10'


I get the card id back .. i haven't figure how to get the card value :(
Code: Select all
1
18
47
15
46
20
32
51
10
14



Could you please help me.
Thanks.
neos2k1
 
Posts: 15
Joined: Fri May 16, 2008 12:58 pm

Re: Values for Card_ids

Postby WhiteRider » Sun Feb 22, 2009 3:27 pm

My post that you linked has a section showing the individual card values.

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


You can only use the lookup values in Statistics, not in Columns. If you want to handle card IDs in columns you will need to use the numeric values.

If you want to see how to display the cards have a look at the Format tab of stats like Hole1 and Hand (or the board cards) in the Holdem Cash Hand section on the custom stats window.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Values for Card_ids

Postby neos2k1 » Mon Feb 23, 2009 8:44 am

I was actually connected to the database ... I was trying to get the info from the database rather from PT. :)
As far as I can see there is no table in the database to link the card values with the cards_ids. I can't find the lookup function in the database .. maybe I was not looking in the right direction or maybe it's not there. Could you please confirm.

What I'm trying to do is to extract the hole cards from the database rather from PT, I was trying to pair the IDs with the values but there is no such table .. i think now is not necessary because you have the lookup function. Maybe the easy solution for me would be to create another table in the database and link the card values with card IDs. :D

"You can only use the lookup values in Statistics, not in Columns. If you want to handle card IDs in columns you will need to use the numeric values."

One questions though: what do you mean by Columns ?

Thanks for your reply.
neos2k1
 
Posts: 15
Joined: Fri May 16, 2008 12:58 pm

Re: Values for Card_ids

Postby kraada » Mon Feb 23, 2009 11:22 am

There's a table in the database: lookup_hole_cards.
The query:

select * from lookup_hole_cards;

will show you all of the hole card information along with id numbers there for you.

WhiteRider was referring to the way you create custom statistics in PT3 when he was talking about columns. Click Configure --> Statistics to see the custom stats creation area; the general overview is to create a column that gets the information you want from the database, then create a statistic that displays it.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 2 guests