SELECT DISTINCT(o.id), o.*, og.kort, og.naam, og.website AS ww2, pl.nl AS plaats, r.nl AS regio FROM objecten AS o LEFT JOIN objecten_regio AS r ON o.regio_id=r.id LEFT JOIN objecten_plaats AS pl ON o.plaatsen_id = pl.id LEFT JOIN objecten_pagina AS op ON o.id = op.eigen_object_id LEFT JOIN object_gegevens AS og ON o.id = og.object_id AND og.domein = 'www.campingsitalia.nl' WHERE 1=1 AND r.id = 21 AND pl.id = AND o.zichtbaar = '1' AND o.show_on LIKE '%1%' ORDER BY o.premium DESC, o.betaald DESC, o.betaald_boekingslink DESC, RAND() 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 'AND o.zichtbaar = '1' AND o.show_on LIKE '%1%' ORDER BY o.premium DESC, o.betaal' at line 1