MySQL server has gone away SQL query : select categoryID, name, brief_description, customers_rating, Price, in_stock, customer_votes, list_price, pt.productID, default_picture, sort_order, items_sold, enabled, product_code, description, shipping_freight, po.option_value from SS_products AS pt LEFT JOIN SS_product_options_values AS po ON pt.productID=po.productID and po.optionID=36 where (in_stock>0) AND ( enabled=1 AND categoryID=7911) order by in_stock DESC, Price, name