I have a table to entities (lets call them people) and properties (one person can have an arbitrary number of properties). Ex:
Ex: People older than 26
Jane Smart, Funny, Good-looking
Joe Smart, Workaholic
SELECT x.name, GROUP_CONCAT(y.property SEPARATOR ', ') FROM PEOPLE x LEFT JOIN PROPERTIES y ON y.name = x.name WHERE x.age > 26 GROUP BY x.name
You want the MySQL function GROUP_CONCAT (documentation) in order to return a comma separated list of the PROPERTIES.property value.
I used a LEFT JOIN rather than a JOIN in order to include PEOPLE records that don't have a value in the PROPERTIES table - if you only want a list of people with values in the PROPERTIES table, use:
SELECT x.name, GROUP_CONCAT(y.property SEPARATOR ', ') FROM PEOPLE x JOIN PROPERTIES y ON y.name = x.name WHERE x.age > 26 GROUP BY x.name
I realize this is an example, but using a name is a poor choice for referencial integrity when you consider how many "John Smith"s there are. Assigning a user_id, being a numeric value, would be a better choice.