PDA

View Full Version : SQL Query Last hand



joostburg
12-12-2008, 08:40 AM
Hi i wanna build a query where i get the last 25 hands that i played with hole cards and the handhistory of the hand. Can anybody help me plz? :D

Al1
12-12-2008, 09:22 AM
Hi i wanna build a query where i get the last 25 hands that i played with hole cards and the handhistory of the hand. Can anybody help me plz? :D

http://img373.imageshack.us/img373/2699/image1wh2.jpg

joostburg
12-12-2008, 09:43 AM
I am building my own program. So i need the query code, i gonna try to build my own.

Al1
12-12-2008, 09:50 AM
I am building my own program. So i need the query code, i gonna try to build my own.

K, I will ask the question to Roy (Programmer), he will answere asap.

joostburg
12-12-2008, 10:36 AM
Wait i will fix it by my self then i can learn something :D I Post my querie when it is finished.

Rvg72
12-12-2008, 02:13 PM
Here it is in case you get stuck:

select ph.holecard1int,ph.holecard2int,hh.handhistory from playerhandscashkeycolumns ph join handhistories hh on ph.pokerhand_id = hh.pokerhand_id
where player_id = 1 order by handtimestamp desc limit 25

1 to 13 = diamond (Ace to King)
14 to 26 = Club
27 to 39 = Hearts
40 to 52 = Spades