select a.id, a.date_added, a.active,
b.title, b.description, b.genre, b.page_seo_url,
group_concat(convert(f.category_id,char(8))) as BlogCategoryID
from blog a
left join blog_details b on (a.id = b.blog_id and b.language = 1)
left join blog_gallery c on (a.id = c.table_id)
left join media_library d on c.media_library_id = d.id
left join blog_category_rel e on e.blog_id = a.id
left join blog_category_details f on (e.category_id = f.category_id and f.language = 1)
where a.active = 1
and b.page_seo_url = 'halftime-shows-nba--nfl--cfl'
group by a.id
FUSION Talent Group is proud to present a diverse roster of headline entertainers for sports halftime shows. Whether be NFL, CFL, or the NBA we're sure to meet the needs to our client list coast to coast. For more information contact firstname.lastname@example.org and ask for either Allyson Urban or Andrew Pogson.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
left join blog_category_details f on (e.category_id = f.category_id' at line 5