Query error: SELECT DISTINCT SQL_CALC_FOUND_ROWS p.product_id as `pid`, p.*, FROM_UNIXTIME( p.cdate, '%Y-%m-%d %H:%i:%s' ) AS created, c.category_name as category, c.category_name_ua as category_ua, c.category_id as category_id, c.is_selection as category_selection, concat(c.category_sef, '.html') as `category_url`, concat('/', p.product_id, '-', p.product_sef, '.html') as `url`, concat('/selection/', p.product_id, '-', p.product_sef, '.html') as `selection_url`, concat('/parts_base/', p.product_id, '-', p.product_sef, '.html') as `parts_base_url`, if( product_full_image != '', concat('products/', p.product_full_image), '' ) as `product_image`, if( p.selection_image != '', concat('products/', p.selection_image), '' ) as `selection_image`, c.usd_course as `usd_course`, if(p.product_price != 0, p.product_price, NULL) as `price`, p.product_currency as `currency` FROM jos_vm_product p USE INDEX (pname), jos_vm_product_category_xref cx, jos_vm_category c WHERE ((p.is_selection != 1 and not (c.category_id in(select category_id from jos_vm_category where is_selection=1))) and (c.category_id in (101,75,131) and product_full_image != "" and lost_image != 1)) AND cx.product_id = p.product_id AND cx.category_id = c.category_id AND c.category_publish='Y' AND p.product_publish='Y' group by cx.product_id order by rand() asc limit 0, 5
MySQL server has gone away