Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

get comma separated values in mysql with group by

SELECT p.id, p.name, GROUP_CONCAT(s.name) AS site_list
FROM sites s
INNER JOIN publications p ON(s.id = p.site_id)
GROUP BY p.id, p.name;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #comma #separated #values #mysql #group
ADD COMMENT
Topic
Name
3+1 =