views:

65

answers:

1

Hi all,

I have a complex MySQL problem.

SELECT *
FROM banners, content_id_country, languages
    WHERE content_id_country.content_id = banners.id
        AND content_id_country.controller = 'banners'

Gives me a long result back. The result is perfect, there is only one problem.

Some rows are duplicates, so they have only one field changed.

The result will look like:

1 - Title - Text - NL
1 - Title - Text - EN

When I use a "GROUP BY banners.id" one of the two disappears. That is particaly what I am achieving.

The result I would like to get looks like this: 1 - Title - Text - NL, EN

So basically I would like to merge the row, and add a comma.

I hope that this is possible.

+5  A: 

See this question:

Can I concatenate multiple MySQL rows into one field?

Welbog