I truly hope this is in the correct place. I apologize in advance if I'm in error.
I've created this join:
SELECT teams.MemID, teams.Captain_flag, member.Email FROM member INNER JOIN teams ON member.MemID = teams.MemID WHERE SeasonID = 85 ORDER BY member.MemID ASC, teams.Captain_flag DESC
The teams table has 291 entries and the member has over 5500. When I execute it in phpMyAdmin it works: I get 291 results. When I execute from my php code I get 269 results. In addition to being 22 short, what I do get is not correct. I have not done an exhaustive search, but have found these 2 inconsistencies: (1) member 3143 is NOT in teams, but shows up in the join and (2) member 2068 is in teams 4 times but only shows up 3 times in the join.
Obviously, I prefer to use the join rather than access member 291 times.