Всего выполнено запросов: 11 шт. Закрыть

Ошибка в SQL запросе: SELECT DISTINCT p.id, CONCAT(c.parent_url,c.url) as category_url, p.url as product_url, p.*,pv.product_id as variant_exist FROM `mg_product` p LEFT JOIN `mg_category` c ON c.id = p.cat_id LEFT JOIN `mg_product_variant` pv ON p.id = pv.product_id LEFT JOIN ( SELECT pv.product_id, SUM( pv.count ) AS varcount FROM `mg_product_variant` AS pv GROUP BY pv.product_id ) AS temp ON p.id = temp.product_id WHERE c.id IN (87) AND p.activity = 1 AND (temp.`varcount` > 0 OR temp.`varcount` < 0 OR p.count>0 OR p.count<0) ORDER BY recommend ASC, new DESC LIMIT -48, 48
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-48, 48' at line 13

/var/www/vhosts/adagattinew.ru/m7557.ru/mg-core/lib/navigator.php (line 46)

/var/www/vhosts/adagattinew.ru/m7557.ru/mg-core/models/catalog.php (line 136)

/var/www/vhosts/adagattinew.ru/m7557.ru/mg-core/controllers/catalog.php (line 56)

/var/www/vhosts/adagattinew.ru/m7557.ru/mg-core/lib/moguta.php (line 35)

/var/www/vhosts/adagattinew.ru/m7557.ru/mg-core/mg-start.php (line 48)

/var/www/vhosts/adagattinew.ru/m7557.ru/index.php (line 88)