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 'LIMIT 0, 20000' at line 1
SELECT publication_start AS start, publication_end AS end, catalog_categories_id AS id FROM merstan_catalog_categories WHERE (publication_start<>'0000-00-00' OR publication_end<>'0000-00-00') AND current_flag=1 AND languages_id=1 AND publication_id=5 AND catalog_id= LIMIT 0, 20000