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(10860884,10861034,10861043,10930095,8594638,8594648,8595011,8065843,7200293,10865951,10865952,10866086,7198698,7198746,7198749,7199200,7199666,10853732,10853739,10853742,10854075,10854198,10854199,7197412,7196155,10426281,10426371,8611385,10616608,8904951,8853336,8853337,8853339,10614177,10609150,10609154,10609259,10612344,10609397,10609398,10609505,10609537,10609942,10613085,10613087,10613088,10613091,10613440,10613693,10610708,10610906,6673528,7055498,6673549,6673550,9911669,9911740,6673843,6673854,6673939,6673978,6674310,9912438,9912439,9912689,8552170,8552174,8850931,10419229,8848183,6672565,8848197,6672808,6672811,6672905,6672907,6673181,6673206,6673217,6673243,6673244,10419120,9169239,7055449,10117485,9167712,9167763,9168029,8848049,9168236,9168264,9168269,8848107,10884683,10885353,10887510,10887516,10882519,10887660,10882710,10883400,10888443,10161812,10886582,10887005,10887013,10887017,10887018,10887021,10887031,10882435,10608869,10647335,10647336,10507574,10413522,10409750,10409756,10409876,10415055,10415057) 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'