QUERY: SELECT p.products_id, p.products_model, p.label_ids, p.main_category, p.products_ean, p.products_fsk18, p.products_quantity, p.products_quantity_min, p.products_quantity_step, p.products_price, p.products_price_small_opt, p.products_price_opt, p.products_purchase_price, p.small_opt_purchase_price, p.count_small_opt_purchase_price, p.count_opt_purchase_price, p.opt_purchase_price, p.postavshik, p.suplier_catalog_id, p.postavshik_comment, p.name_catalog_id, p.products_tax_class_id, p.products_image, p.products_vpe, p.products_vpe_status, p.products_vpe_value, p.products_currency, p.products_page_url, p.video, p.show_video, pd.products_short_description, p.rev_total, p.rev_rating, pd.products_name, p.products_ordered, pd.products_short_description, s.status, IF(s.status, s.specials_new_products_price, 0) as specials_new_products_price, m.manufacturers_name, m.manufacturers_id FROM products AS p LEFT JOIN products_description AS pd ON (p.products_id = pd.products_id) LEFT JOIN manufacturers AS m ON (p.manufacturers_id = m.manufacturers_id) LEFT JOIN specials AS s on p.products_id = s.products_id LEFT JOIN products_to_categories as p2c2 ON (p2c2.products_id=p.products_id) LEFT JOIN categories as c ON (c.categories_id=p2c2.categories_id) WHERE p.products_status = 1 AND c.categories_status = 1 AND pd.language_id = '1' AND p.products_id IN(10861767,10859522,10857601,10857602,10857603,10857604,10857605,10857606,10857607,10857608,10857609,10857610,10857611,10857612,10857613,10857614,10857615,10857616,10857617,10857618,10857619,10857620,10857621,8910585,10101524,10853314,10618325,10855007,7197984,7197985,10852612,10426253,10611814,10611815,10611816,10611817,10611818,10609305,10612342,8862530,10117842,10117843,10117844,991407,991408,10415616,6673155,6673156,10468362,10468363,10884622,10884623,10884624,10627712,10607007,10601493,10413978,10410220,10410223,10412228,10412229,10412230,10412231,10412232,10412233,10412234,10412235) GROUP BY p.products_id ORDER BY CASE WHEN products_price = 0 THEN 99999999 WHEN products_price > 0 THEN products_price END asc ,p.products_specials desc
ERROR: Unknown column 'p.products_specials' in 'order clause'