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.`dir` = 1' at line 5
SELECT links.*, cats.`path` cat_path, cats.`id_dir` cat_id FROM `las_links` AS links LEFT JOIN `las_categories` AS cats ON links.cat = cats.id_dir WHERE links.`id_dir` = AND links.`dir` = 1