کد خطا : 0
توضیح : MySQL Query fail: SELECT DISTINCT products.id,products.title,FORMAT(products.price,0) AS price,FORMAT(products.price/10,0) AS price,IFNULL(SUM(orders_list.qty),0) as total_sells FROM orders_list INNER JOIN orders ON orders.id = orders_list.order_id AND orders.date > CURDATE() - INTERVAL 7 DAY RIGHT JOIN products ON products.id = orders_list.product_id INNER JOIN products_cats ON products.id=products_cats.product_id AND products_cats.cat_id IN (32,47,169,37,103,132,147,166,152,150,66,151,154,148,149,160,162,156,157,158,159,155,153,161,163,167,164,165,70,38,112,77,41,73,71,72,76,105,42,120,115,116,43,111,121,40,122,123,124,125,126,138,139,140,81,45,87,27,25,36,143,142,144,146,91,92,93,23,24,) WHERE products.stock>0 AND products.status=1 AND products.stock>0 GROUP BY products.id ORDER BY total_sells DESC, id DESC LIMIT 0,5

بازگشت