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 'order by CASE WHEN p.stock_status = 1 THEN 0 WHEN p.stock_status IN ' at line 1

order by CASE WHEN p.stock_status = 1 THEN 0 WHEN p.stock_status IN (0, 2) THEN 1 ELSE 2 END, pd.products_printer_spec desc, pd.is_cartridge desc, p.products_bundle desc, pd.cartridge_types_id desc, pd.products_name

[TEP STOP]