MySQL fatal error! Cannot complete query: 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 links.`status` = 1 ORDER BY links.`title` ASC' at line 6
SELECT COUNT(links.`id_dir`) FROM `las_links` AS links LEFT JOIN `las_categories` AS cats ON links.cat = cats.id_dir WHERE links.`dir` = 1 AND links.`group` LIKE '%1%' AND links.`cat` = AND links.`status` = 1 ORDER BY links.`title` ASC