server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

select count(*) as num from (SELECT prod_table.id as pid1, prod_name,prod_code,prod_detail,prod_detail2,prod_cond,pict1,sell_price,pid,cid,cid2,prod_status,num,sell_price,(select title from year_table where year_id=year_table.id) as year_str FROM prod_table ,prod_to_categ WHERE prod_table.id=pid AND valids='Y' AND (sell_item='Y') AND cid2=2136ORDER BY jun,pid) as r