I need to know which players were involved in the last hand of a given session.
In the moment im doing it this way:
[codemhj]
SELECT hhps.id_hand, hhps.date_played, hhps.id_player, hhpd.seat FROM holdem_hand_summary hhs, holdem_hand_player_statistics hhps , oldem_hand_player_detail hhpd
WHERE hhps.id_hand = hhs.id_hand and hhpd.id_hand = hhs.id_hand and hhpd.id_player= hhps.id_player AND hhps.id_hand in
(SELECT hhps.id_hand FROM holdem_hand_summary hhs, holdem_hand_player_statistics hhps WHERE hhps.id_hand = hhs.id_hand AND hhps.id_session =6931) order by hhps.date_played desc, hhps.id_hand desc limit 10[/codemhj]
Then run through those hands and while the handno keeps the same i grab the player_id, but I guess there is a better way...I just couldnt figure it out...
If I only needed the id I could use DISTINCT, but I also need the seat no., so this isnt possible
