Липецк, Неделина 28А

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

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