How to use MySQL to return a concatenated string? -


i using custom built version of data tables list records tables. of time wonderful need join 2 or more tables show specific data lookup tables. here new problem. have 3 tables... event_categories, themes, , themes_eventcategories. event_categories , themes normal tables , themes_eventcategories has fields 'id', 'theme_id', , 'event_category_id'.

what need list of event categories , if there themes associated event category, need themes in comma separated string. possible?

what want group_concat, maybe like:

select event, group_concat(theme) themes_eventcategories join event_categories b on a.event_category_id = b.id join themes c on a.theme_id = c.id group event 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -