It looks like I am missing some of my results. The query I am using in pgAdmin is
- Code: Select all
SELECT tourney_holdem_summary.tourney_no as "tourney_no"
FROM tourney_holdem_summary WHERE
((SELECT sum(val_finish)
FROM tourney_holdem_results thr WHERE
thr.id_tourney = tourney_holdem_summary.id_tourney) = 0)
AND tourney_holdem_summary.id_site in (1200)
AND tourney_holdem_summary.amt_buyin != 0
ORDER BY tourney_no DESC;
It returns results the same results as what is displayed on the "PT3 Holdem Tournament Results" screen. Looking at a recent tournament result that PT3 has, I can see what the problem is. It has data for 4th place entered, and I went out in 3rd. Data show 0, 0, 0, then 4-10 beside the player names. sum(val_finish) is non-zero, but the value for my id is zero.
I don't really understand SQL, but I am trying.
Seem like I need to effectively replace
- Code: Select all
((SELECT sum(val_finish)
FROM tourney_holdem_results thr WHERE
thr.id_tourney = tourney_holdem_summary.id_tourney) = 0)
With something like
- Code: Select all
tourney_holdem_results.id_player=243164 AND tourney_holdem_results.val_finish=0
If I browse the tourney_holdem_results I can see there are 13 entries for me that have no results. I can create a query that shows tourney_holdem_summary.tourney_no and tourney_holdem_summary.id_tourney side by side, but that seem like cheating. Any help wth formating the query correctly would be great.
Thanks