I'm a little confused how to start this. I have a table of attribute names and then a table of attribute field names. As such
**Table: attributes**
id
name
**Table: attributes_fields **
id
attrID
fieldname
The attrFields can have multiple records attached to a single attr. I'm trying to get the output something like so.
Name Fields (comma separated field id's)
9 1,3,4,5
So far I have this.
SELECT *
FROM attributes
LEFT JOIN attributes_fields on attributes.attributeID = attributes_fields.attributeFieldParentID
WHERE attributes.attributeID = 9
Which works, but not as I would like it. I'm looking for one row to be returned. The above returns all the fields as multiple rows.
Any help would be great.
Thanks!