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.id_type = AND o.id_category= ORDER BY RAND() ' at line 13


SELECT
o.id_status, o.id,ol.caption,o.price,o.is_new, o.city_name, pc.name as pcname, f.path, t.name as tname, c.name as cname, pu.name as puname
FROM
objects as o
LEFT JOIN objects_languages as ol on (ol.id_object = o.id)
LEFT JOIN types as t on (o.id_type = t.id)
LEFT JOIN categorys as c on (o.id_category = c.id)
LEFT JOIN districts as d on (o.id_district = d.id)
LEFT JOIN price_currencys as pc on (pc.id = o.price_currency)
LEFT JOIN price_units as pu on (pu.id = o.price_unit_id)
LEFT JOIN files as f on (o.preview = f.id)
WHERE
1=1 AND ol.id_language = 1 AND o.id_branch = 26032783 AND o.id!= AND o.id_type = AND o.id_category=

ORDER BY RAND()

LIMIT 4

;