I'm not sure how to do this so I'm asking it here...
I have 3 tables in my database with structure like this..
table:contact ----- rows: contact_id, firstname
table:groups ------rows: group_id, group_name
table:groupmembership ------ rows: contact_id, group_id
The association between between "contact_id" and "group_id" in the table "group_membership" reflects a contact that is in a particular group.
What I need to do is take a contact_id, and display which groups he is a member of in a dropdown list. I'll eventually use this dropdown list to post the group_id to a page that diplays the group info.
Can anyone help me with how to formulate the MySQL query?