SELECT ev.id, evt.title, evt.text_short AS prezentare_short, evt.text AS prezentare, CONCAT(evimg.image_file_name,'.',evimg.image_extension) AS even_main_image FROM evenimente AS ev LEFT JOIN evenimente_text AS evt ON (ev.id=evt.id) LEFT JOIN `evenimente_images` AS evimg ON (evimg.id_eveniment = ev.id AND evimg.main_image = 1) WHERE ev.id=

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 '' at line 1