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 'AND p.status = '1' AND p.date_available <= NOW() AND pd.language_id = '1' AND p2' at line 1
Error No: 1064
SELECT *, pd.name AS name, p.image, m.name AS manufacturer, ss.name AS stock, (SELECT AVG(r.rating) FROM oc_review r WHERE p.product_id = r.product_id GROUP BY r.product_id) AS rating FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN oc_manufacturer m ON (p.manufacturer_id = m.manufacturer_id) LEFT JOIN oc_stock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.deleted = 0 AND AND p.status = '1' AND p.date_available <= NOW() AND pd.language_id = '1' AND p2s.store_id = '0' AND ss.language_id = '1' AND m.manufacturer_id = '40' ORDER BY p.sort_order ASC LIMIT 0,10