I have this SQL.
SELECT s.usr_id,s.gender,s.frstnm,s.lstnm,s.bthdate,s.active,r.*,COUNT(h.swimmer_id) as hcount from swimmers s LEFT JOIN responses r on s.usr_id=r.swimmer_id LEFT JOIN heats h on h.swimmer_id=s.usr_id where ((r.meet_id='$_POST[meet_id]'||r.meet_id='NULL') $genderrestrict) and (s.bthdate>'$minbth' and s.bthdate<'$maxbth') group by s.usr_id order by s.lstnm
When there is not a responses row to join then nothing gets returned even though there are multiple swimmers which meet my criteria...little confused...shouldn't it work thought not having a row to join from responses?