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(10862180,8609572,8628585,8628608,10859937,10859939,10859944,10859946,10859969,10859970,10859971,10859972,10859974,10859976,10859978,7200639,7200640,7200641,7200642,7200643,7200780,10855536,10855557,10855562,10855572,10855573,10855574,10855575,10863989,10863990,10863991,10863992,8625394,8625466,8625467,8625468,8625469,8625470,8625471,8625472,8625474,8625475,8625476,8625477,8625478,8625479,8625480,8625481,8625482,7199540,7199541,3927180,10855096,10425484,10425934,10426008,10612931,10613079,10613099,10613106,10613110,10613111,10613115,10613116,9912057,9912204,9913359,10417394,10417395,10417396,10417397,10415882,976463,10889201,10889202,10884723,10889756,10887546,10883358,10883359,10883378,10630051,10603510,10507721,10409678,10410297,10414318,10414332,10414334,10414347,10414365,10414366,10414367,10414369,10414371,10410700,10410721,10410726,10410736,10410737,10410738,10410739) 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'