joined:Jan 4, 2005
I can't seem to figure this out. It's using MySQL.
I would like all cn.notes to be returned in an array if there are multiple notes.
I have this query:
SELECT *, GROUP_CONCAT(cn.notes) as all_notes FROM CUSTOMERS as c JOIN customer_notes as cn on cn.customers_id_fk = c.customer_id LEFT JOIN customer_url as cu on cu.customers_id_fk = c.customer_id LEFT JOIN sales as s on s.url_id_fk = cu.url_id WHERE c.customer_id = 6 GROUP BY cn.notes_id
This only returns the last note in the DB.
Any help would be great!