SELECT a.*,case a.pro_order when 0 then 999 else a.pro_order end as pro_order, case pro_mark when '2' then 2 when '0' then 1 else 0 end as ords, (SELECT c.img_path from bb_image_bank c where c.img_id = (SELECT b.img_id from bb_product_file b where b.pro_id = a.pro_id and b.pro_file_state = 1 limit 1) and c.img_path is not null) as img_path from bb_product a where a.pro_state = 1 and '2021-10-18 20:03:49' >= a.pro_online_date and a.pro_online_date!='0000-00-00 00:00:00' and a.pro_vip = 0 and a.com_id = 9560 and a.pro_bbt_state <> 2 order by ords desc,pro_order,a.pro_up_date desc limit 0,5Table './50_syn_bbt/bb_product' is marked as crashed and should be repaired