Подскажите как найти ошибку 1064. Интересует алгоритм поиска этой ошибки. Спасибо.
2013-05-19 13:56:37 - PHP Notice: Error: 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 ' 552, 546, 514, 511, 507, 506, 503, 500) and pd.language_id = '1' AND p.status =' at line 1<br />Error No: 1064<br />SELECT p.product_id, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_to_category p2c ON (p.product_id = p2c.product_id) WHERE p.product_id in ( 554, 552=, 552, 546, 514, 511, 507, 506, 503, 500) and pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p2c.category_id = '24' GROUP BY p.product_id LIMIT 0,10 in /home/.../.../.../public_html/system/database/mysql.php on line 49
2013-05-20 5:23:03 - PHP Notice: Error: 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 '1??) and pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() A' at line 1<br />Error No: 1064<br />SELECT p.product_id, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_to_category p2c ON (p.product_id = p2c.product_id) WHERE p.product_id in ( 484, 217 1??) and pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p2c.category_id = '25' GROUP BY p.product_id LIMIT 0,2 in /home/.../.../.../public_html/system/database/mysql.php on line 49