Select distinct id from tm_templates a, tm_templates_to_categories b where a.visible=1 and a.id = b.template_id and (a.keywords_fr like '%main-d'A“uvre%' OR a.description like '%main-d'A“uvre%') 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 'A“uvre%' OR a.description like '%main-d'A“uvre%') and adult=0 order by id d' at line 1