Error: Can't create/write to file '/mysql-tmp/#sql_2928_3.MYI' (Errcode: 13)
Error No: 1
SELECT *, pd.name AS name, p.price, (SELECT ps2.price FROM open_product_special ps2 WHERE p.product_id = ps2.product_id AND ps2.customer_group_id = '8' AND ((ps2.date_start = '0000-00-00' OR ps2.date_start < NOW()) AND (ps2.date_end = '0000-00-00' OR ps2.date_end > NOW())) ORDER BY ps2.priority ASC, ps2.price ASC LIMIT 1) AS special, p.image, m.name AS manufacturer, ss.name AS stock, (SELECT AVG(r.rating) FROM open_review r WHERE p.product_id = r.product_id GROUP BY r.product_id) AS rating FROM open_product p LEFT JOIN open_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN open_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN open_product_special ps ON (p.product_id = ps.product_id) LEFT JOIN open_manufacturer m ON (p.manufacturer_id = m.manufacturer_id) LEFT JOIN open_stock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.status = '1' AND p.date_available <= NOW() AND pd.language_id = '1' AND p2s.store_id = '0' AND ss.language_id = '1' AND ps.customer_group_id = '8' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW())AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) AND ps.product_id NOT IN (SELECT pd2.product_id FROM open_product_discount pd2 WHERE p.product_id = pd2.product_id AND pd2.customer_group_id = '8' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW()))) GROUP BY p.product_id ORDER BY LCASE(pd.name) ASC LIMIT 0,5