Say, your sql result will return multiple rows that may look something like this

id email
1 email1@email.com
1 email2@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

id email
1 email1@email.com email2@email.com

The syntax used was SELECT id, GROUP_CONCAT(email, ‘ ‘)

You can use any other character like comma.

Related Posts Plugin for WordPress, Blogger...