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 cps_image_bank c where c.img_id = (SELECT b.img_id from cps_product_file b where b.pro_id = a.pro_id and b.pro_pic_state = 1 limit 1) and c.img_path is not null) as img_path from cps_product_fr a where a.pro_state = 1 and a.pro_vip = 0 order by a.pro_date desc,pro_order limit 0,10MySQL server has gone away