SQL: [356] select ve_goods.* from `ve_goods` left join `ve_params_values` as `v` on `v`.`good_id` = `ve_goods`.`id` where `is_site` = ? and `category` in (?) and `ve_goods`.`inprod` = ? and `v`.`uv` = ? order by CASE WHEN status2 & 2 THEN 1 WHEN status2 & 57 THEN 2 ELSE 3 END, ord_good DESC, 1 asc limit 0, 21 Sent SQL: [390] select ve_goods.* from `ve_goods` left join `ve_params_values` as `v` on `v`.`good_id` = `ve_goods`.`id` where `is_site` = '1' and `category` in ('788') and `ve_goods`.`inprod` = '0' and `v`.`uv` = 'tolschina-planki-mm:::1-5' order by CASE WHEN status2 & 2 THEN 1 WHEN status2 & 57 THEN 2 ELSE 3 END, ord_good DESC, 1 asc limit 0, 21 Params: 4 Key: Position #0: paramno=0 name=[0] "" is_param=1 param_type=2 Key: Position #1: paramno=1 name=[0] "" is_param=1 param_type=2 Key: Position #2: paramno=2 name=[0] "" is_param=1 param_type=2 Key: Position #3: paramno=3 name=[0] "" is_param=1 param_type=2 NULL