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(10848657,10848658,10848659,8583534,7066181,7066182,7201433,7201434,7201435,7201436,7201437,7201438,7201439,7201440,7201441,7201442,7201443,7201444,7201445,8595235,8911747,8911748,7202678,7202679,8627255,8627256,8627257,7201064,7201065,7201066,10931197,10864066,10864067,10864068,10864069,10864070,10864071,10864072,10864073,10864074,10864075,10864076,10864077,10864078,10864079,10864080,10864081,10864082,10864083,10864084,10864085,10864086,10864087,10864088,10864089,10864090,10864091,10864092,10864093,10864094,10864095,10864096,10864097,10864098,3926351,7199490,7199491,7199492,8906012,8906013,3923622,7198024,8541668,10615499,10615500,10615501,10615502,10615503,10615504,10615505,10615506,10615507,10615508,10615509,10615510,10615511,10615512,10615513,10615514,10615515,10615516,10615517,8611403,8634294,10616890,10616891,8852375,8852376,8852377,10613371,10613700,9169431,9169524,9169525,9169526,9169527,9169528,9911802,6674154,6674155,10118393,10118394,10118395,10118396,10118397,9913035,9913036,9913037,9913038,9913039,9913040,9913041,9913042,9913043,9913044,9913045,9913046,9913047,10417443,10417444,10417445,10417446,10417447,10417448,10417449,10417450,10417451,10417452,10417453,10417454,10417455,10417456,10417457,10417458,10417459,10417460,10417461,10417462,10417463,10417464,10417465,8550182,8550183,8550184,10470097,10470098,10470099,10470100,10470101,10470102,10470103,10470104,10470105,10470106,10470107,10470108,10470109,9167829,9167967,10888555,10888556,10888557,10888558,10888559,10888560,10888561,10888562,10888563,10888564,10888565,10888566,10888567,10888568,10884686,10888359,10162170,10162171,10162172,10162173,10162174,10162175,10876808,10876809,10406920,10406921,10406922) 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'