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 AND s.enable = 1 ORDER BY ordering' at line 6

SELECT s.id, s.law_id, s.thumb, s.ordering, s.title,s.alias,s.short_desc,s.description ,c.name AS category_name, a.name AS law_name, a.alias AS law_alias FROM vplshcm_law_detail AS s INNER JOIN vplshcm_law AS a ON a.id = s.law_id INNER JOIN vplshcm_law_categories AS c ON c.id = a.catid WHERE law_id= AND a.enable = 1 AND c.enable = 1 AND s.enable = 1 ORDER BY ordering