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 's~%' and pcoll.products_collection_id = cg.products_collection_id and c.categor' at line 1
in:
[select distinct c.categories_id, cd.categories_name, cg.master_categories_id from categories c, categories_description cd, products_collection pcoll, products cg where c.categories_id=cd.categories_id and cg.master_categories_id=c.categories_id and pcoll.products_collection LIKE '%~1980\\'s~%' and pcoll.products_collection_id = cg.products_collection_id and c.categories_id in (9,9,10,18,22,24,26,30,33,35,38,40,43,48,50,51,53) and cd.language_id='1' and c.categories_status='1' order by c.sort_order,cd.categories_id]