Select distinct id from tm_templates a, tm_templates_to_categories b where a.visible=1 and a.id = b.template_id and id=template_id and type_id='43' and (a.keywords_fr like '% tuyaux-d'gout %' OR a.keywords like '% tuyaux-d'gout %' OR a.software_required like '%tuyaux-d'gout%') and adult=0 order by id desc
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 'gout %' OR a.keywords like '% tuyaux-d'gout %' OR a.software_required like '%tuy' at line 1