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 like '%education %' OR a.software_required REGEXP 'education' or a.keywords like '% %' OR a.software_required REGEXP '') and adult=0 order by id desc
Got error 'empty (sub)expression' from regexp