SELECT holdem_hand_summary.id_hand, holdem_hand_summary.id_site, holdem_hand_summary.date_played,holdem_hand_player_statistics.amt_won
FROM holdem_hand_summary,holdem_hand_player_statistics
WHERE flg_note= true
ORDER BY date_played
DESC Limit 50 offset 0
Which filter (/where...) does work on table holdem_hand_player_statistics?
The goal was to get the ids form the first table and get only these from the second table. So that the id is a condition for the 2nd table.
like this: "get * from holdem_hand_player_statistics WHERE holdem_hand_summary.id_hand = <here the first SELECT blablabla to get the ids from first table>"
is the SQL Query above the correct syntax for this semantics?
EDIT:
BETTER:
SELECT holdem_hand_summary.id_hand,holdem_hand_player_statistics.id_hand, holdem_hand_summary.id_site, holdem_hand_summary.date_played,
holdem_hand_player_statistics.amt_won
FROM holdem_hand_summary,holdem_hand_player_statistics
WHERE flg_note = true AND holdem_hand_summary.id_hand = holdem_hand_player_statistics.id_hand
ORDER BY date_played
DESC Limit 50 offset 0
