SQL: select t1.*, t2.pc_id as id, t2.`pc_name` as pc_name_ru, t2.`pc_name_de`, t2.`pc_name_en`, t3.* from `bereich_cat` as t1 left join categories as t2 on t2.pc_id=t1.pc_id left join categories_urls_seo as t3 on t3.pc_id=t2.pc_id and t3.iso='de' where t1.`bc_deleted` = 0 and t1.br_id = 9?iso=en and t2.exists = 1 order by t2.`pc_name_de` asc 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 '?iso=en and t2.exists = 1 order by t2.`pc_name_de` asc' at line 1