Error: MySQL server has gone away
Error No: 2006
SELECT COUNT(DISTINCT p.product_id) AS total FROM vinatechproduct p LEFT JOIN vinatechproduct_description pd ON (p.product_id = pd.product_id) LEFT JOIN vinatechproduct_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p.product_id IN (SELECT p2c.product_id FROM vinatechproduct_to_category p2c WHERE p2c.category_id = '18')