1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 're%' or cd.categories_heading_title like '%they're%')) and (c.untershop = 1 or c' at line 1

SELECT cd.categories_id,cd.categories_name FROM categories_description AS cd LEFT JOIN categories AS c ON (cd.categories_id = c.categories_id) WHERE cd.language_id = 1 and ((cd.categories_name like '%they're%' or cd.categories_heading_title like '%they're%')) and (c.untershop = 1 or c.untershop = 4) ORDER BY RAND() LIMIT 1

[XT SQL Error]