Help with query

admin

Administrator
Staff member
I have a table of members, and another table of their preferences. The preferences table can contain anywhere from zero to ten rows for each member row.

Is it possible in one query to select information about each member, and get a list of the member's preferences in the same row? They don't have to be returned separately - they could be in a comma-separated list, for example.

So what I would want returned is a list of rows like this:

|------------------------------------|
| member_id | name | preference_list |
| 12 | Joe | 3,8,12,4,23 |
|------------------------------------|

Is this possible, or will I have to do a separate query for each member?

Thanks,
Keegan
 
Back
Top