Error writing file '/tmp/MYIJ2UT4' (Errcode: 28)
SELECT opt.*, name_ru AS name FROM SC_product_options AS opt LEFT JOIN ( SELECT t_cos.optionID, t_cos.category_option_sort_order FROM SC_category_options_sort t_cos WHERE t_cos.categoryID = 12378 ) AS cos ON opt.optionID=cos.optionID LEFT JOIN ( SELECT t_cosic.optionID, t_cosic.category_option_showincategory FROM SC_category_options_showincategory t_cosic WHERE t_cosic.categoryID = 12378 ) AS cosic ON opt.optionID=cosic.optionID GROUP BY opt.optionID ORDER BY IF (cos.category_option_sort_order>0,0,1) ASC, cos.category_option_sort_order ASC, IF(opt.sort_order>0,0,1) ASC, opt.sort_order ASC, name_ru