Notice: Error: Unknown column 'p.status' in 'having clause'
Error No: 1054
SELECT COUNT(DISTINCT p.product_id) AS total FROM br_product_to_category p2c LEFT JOIN br_product p ON (p2c.product_id = p.product_id) RIGHT JOIN br_order_product op ON (op.product_id = p.product_id)WHERE p.product_id > '1' OR p2c.category_id = '272' group by p.product_id HAVING COUNT(distinct(op.order_id)) > '10' AND p.status > 0 in /var/www/blurayshopG/blu-ray-shop.com.ua/system/database/mysql.php on line 50