I have a database with two tables groups and members. The columns from these tables are below.
Groups table: group_id,group_name
Members table: member_id,group_id,status
I have an app that needs to display a list of groups along with the groups members. What is the most efficient way to say SELECT * from groups then for each group/row returned do another select on the members table to query the members (for example SELECT * FROM members WHERE group_id=X).
JOIN? If not, good place to start.