SELECT a.*, case pro_mark when '1' then 2 when '0' then 1 else 0 end as ords, case a.pro_rank when '1' then 2 when '2' then 1 else 0 end as ords2, (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 a.pro_bbt_state <> 2 and '2024-06-28 00:47:08' > a.pro_online_date and a.pro_online_date!='0000-00-00 00:00:00' and a.com_id=2541 and a.pro_id in(SELECT pro_id from bb_product_keyword where pro_key_id = 531800 or ( TRIM(keyword) = (SELECT TRIM(keyword) from bb_product_keyword where pro_key_id = 531800)))Table './50_syn_bbt/bb_product_keyword' is marked as crashed and last (automatic?) repair failed