by kraada » Wed Aug 08, 2012 1:43 pm
If you want the hand histories you'd do something like:
SELECT hhh.history from holdem_hand_histories hhh where hhh.id_hand in (SELECT hhps.id_hand from holdem_hand_player_statistics hhps, player p where p.id_player = hhps.id_player and p.player_name = 'Player A') and hhs.id_hand in (SELECT hhps.id_hand from holdem_hand_player_statistics hhps, player p where p.id_player = hhps.id_player and p.player_name = 'Player B')
replace Player A and Player B as needed. This kind of query will take some time to complete though especially as your database gets large, so keep that in mind.