Невозможно выполнить запрос

SELECT * , DATE_FORMAT(creation_ts, '%d-%m-%Y') as 'date' FROM adverts INNER JOIN structure ON adverts.id_section=structure.id_structure  LEFT JOIN ad_status ON adverts.id_status=ad_status.id_status LEFT JOIN ad_course ON adverts.id_course=ad_course.id_course LEFT JOIN ad_city_status ON adverts.city_id_status=ad_city_status.city_id_status LEFT JOIN ad_house_type ON adverts.house_id_type=ad_house_type.house_id_type LEFT JOIN ad_house_condition ON adverts.house_id_condition=ad_house_condition.house_id_condition LEFT JOIN ad_plot_plant ON adverts.plot_id_plant=ad_plot_plant.plot_id_plant LEFT JOIN ad_plot_fence ON adverts.plot_id_fence=ad_plot_fence.plot_id_fence LEFT JOIN ad_plot_security ON adverts.plot_id_security=ad_plot_security.plot_id_security LEFT JOIN ad_plot_forest ON adverts.plot_id_forest=ad_plot_forest.plot_id_forest LEFT JOIN ad_road ON adverts.id_road=ad_road.id_road LEFT JOIN ad_comm_water ON adverts.comm_id_water=ad_comm_water.comm_id_water LEFT JOIN ad_comm_electricity ON adverts.comm_id_electricity=ad_comm_electricity.comm_id_electricity LEFT JOIN ad_comm_gas ON adverts.comm_id_gas=ad_comm_gas.comm_id_gas LEFT JOIN ad_comm_heating ON adverts.comm_id_heating=ad_comm_heating.comm_id_heating LEFT JOIN ad_comm_sewer ON adverts.comm_id_sewer=ad_comm_sewer.comm_id_sewer LEFT JOIN ad_comm_phone ON adverts.comm_id_phone=ad_comm_phone.comm_id_phone WHERE (( adverts.id_status=1 ) OR (id_customer=''))  AND ( id_advert=left)  ORDER BY publication_ts DESC

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ORDER BY publication_ts DESC' at line 1

Прекращение выполнения скрипта