Mysql error: Unknown column 'num_sales' in 'order clause'
Error code: 1054
Query: SELECT DISTINCT CatID, COUNT(*) as filter_num FROM catalog_models INNER JOIN catalog_models_to_groups ON catalog_models.ID=catalog_models_to_groups.ModelID LEFT JOIN shop_orders_models ON shop_orders_models.ModelID = catalog_models.ID WHERE catalog_models.Status != 200 AND `GroupID` = ? AND (shop_orders_models.ID IS NULL OR TIMESTAMPDIFF(DAY, shop_orders_models.Created, NOW()) <= 2) AND CatID > 0 AND catalog_models.HideIndex = ? GROUP BY CatID ORDER BY num_sales DESC
Params:
Array
(
    [0] => 70
    [1] => 
)

Mysql error: Unknown column 'num_sales' in 'order clause'
Error code: 1054
Query: SELECT DISTINCT TopBrandID, COUNT(*) as filter_num FROM catalog_models INNER JOIN catalog_models_to_groups ON catalog_models.ID=catalog_models_to_groups.ModelID LEFT JOIN shop_orders_models ON shop_orders_models.ModelID = catalog_models.ID WHERE catalog_models.Status != 200 AND `GroupID` = ? AND (shop_orders_models.ID IS NULL OR TIMESTAMPDIFF(DAY, shop_orders_models.Created, NOW()) <= 2) AND TopBrandID > 0 AND catalog_models.HideIndex = ? GROUP BY TopBrandID ORDER BY num_sales DESC
Params:
Array
(
    [0] => 70
    [1] => 
)

Топ товаров

Не найдено товаров
24/7