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 'ORDER BY su.id_type' at line 9


SELECT
s.id, s.name, s.color, s.color_light, su.id_type
FROM
_subsections as s
LEFT JOIN _subsections_unions as su on (su.id_subsection = s.id)
WHERE
su.id_legacy =

ORDER BY su.id_type



;