Could not execute SQL: 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 'AND a.enable = 1 AND c.enable = 1 ORDER BY a.ordering LIMIT 0,1' at line 4

SELECT a.id, a.catid, a.thumb, c.name AS category_name, a.name,a.alias,a.short_desc FROM qt3_law AS a INNER JOIN qt3_law_categories AS c ON c.id = a.catid WHERE a.catid= AND a.enable = 1 AND c.enable = 1 ORDER BY a.ordering LIMIT 0,1