Posted by tech on
February 1, 2009
Say, your sql result will return multiple rows that may look something like this
idemail
1email1@email.com
1email2@email.com
There is a pretty useful MySQL function that displays the email addresses found in the 2 rows as one. Using the
GROUP_CONCAT(), e.g.
GROUP_CONCAT(column_name separator_character) maybe result in something like this
idemail
1email1@email.com email2@email.com
The syntax used was
SELECT id, GROUP_CONCAT(email, ' ') ...
You can use any other character like comma…
Continue reading