Error: 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 soc.id ASC, so.label ASC' at line 7 SQL=SELECT so.id, so.label, soc.label AS cat_label FROM franchise_service_ref as fsref LEFT JOIN service_offerings AS so ON so.id = fsref.service_id LEFT JOIN service_offerings_categories AS soc ON so.category_id = soc.id WHERE franchise_id = ORDER BY soc.id ASC, so.label ASC
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 soc.id ASC, so.label ASC' at line 7 SQL=SELECT so.id, so.label, soc.label AS cat_label FROM franchise_service_ref as fsref LEFT JOIN service_offerings AS so ON so.id = fsref.service_id LEFT JOIN service_offerings_categories AS soc ON so.category_id = soc.id WHERE franchise_id = ORDER BY soc.id ASC, so.label ASC