select distinct(`order_id`) from `sb_order` as o left join `sb_order_info` as i using(`order_id`) where o.`type` = "shop" and o.`status` = 0 and o.`work_type` = 23 and o.`work_subject` = 4 and o.`work_type` = 23 and o.`order_id` != 5382 and () order by o.`status_date` desc limit 0, 10
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 o.`status_date` desc limit 0, 10' at line 5