Cannot execute SQL query ...

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 'AND != 705 AND smestaj.tip = "hotel" AND smest' at line 22

SELECT as id, smestaj.tip as tip, smestaj.ime as ime, smestaj.opis as opis, smestaj.kratak_opis as kratak_opis, smestaj.slika as slika, as video, smestaj.imgvideo as imgvideo, smestaj.video_embed as video_embed, smestaj.features as features, smestaj.cena_od as cena_od, as lokacija_id, lokacija.ime as lokacija_ime, kategorija.ime as kategorija FROM smestaj INNER JOIN `lokacija` ON (`smestaj`.`id_lokacija` = `lokacija`.`id`) INNER JOIN `kategorija` ON (`smestaj`.`kategorija` = `kategorija`.`id`) WHERE = AND != 705 AND smestaj.tip = "hotel" AND smestaj.ban = 0 AND lokacija.ban = 0 ORDER by smestaj.prioritet asc, smestaj.ime