Database error: -
select t.id, trim(concat(t.pre, ' ', t.name, ' ', t.extra)) as `theme`, g.name as `group` from themes t, groups g, themes_groups tg where t.id = tg.theme_id and tg.group_id = g.id and t.id = 9 order by sort_order