1064 - 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 'LIMIT 8' at line 10

SELECT p.products_id, p.products_image_med as products_image, p.products_price, p.products_tax_class_id, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price FROM products_shd p iNNER JOIN products_description_shd pd ON p.products_id = pd.products_id AND pd.language_id = '1' INNER JOIN products_to_categories_shd p2c ON p.products_id = p2c.products_id AND p2c.categories_id IN (88) LEFT JOIN specials_shd s ON p.products_id = s.products_id WHERE LEFT(p.products_date_available, 10) <= '2018-03-22' AND p.products_status = '1' AND p.manufacturers_id IN (838,684,633,928,930,908,1121,744,170,958,713,815,686,922,951,681,846,1006,712,1118,837,923,929,973,645,696,690,742,96,97,1030,1136,682,707,1142,688,959,1002,683,119,778,133,997,128,998,414,416,249,752,36,1117,110,1141,748,805,98,344,99,1144,316,915,100,1106,103,709,248,229,134) GROUP BY p.products_id ORDER BY p.products_ordered desc, LIMIT 8