Ошибка в SQL запросе: SELECT count(distinct p.id) AS count
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(IF(pv.count <0, 1000000, pv.count)) AS varcount
FROM mg_product_variant AS pv
GROUP BY pv.product_id
) AS temp ON p.id = temp.product_id WHERE ((p.cat_id IN ('24','25','26','27','28','29','30','31','14') or FIND_IN_SET(14,p.`inside_cat`))) AND p.activity = 1 AND IF(p.count <0, 1000000,
IF(varcount,
IF(p.count
Out of memory (Needed 4194288 bytes)/home/virtwww/w_rubkrai-com-ua_6ae765ac/http/mg-core/models/catalog.php (line 225)
/home/virtwww/w_rubkrai-com-ua_6ae765ac/http/mg-core/controllers/catalog.php (line 176)
/home/virtwww/w_rubkrai-com-ua_6ae765ac/http/mg-core/lib/moguta.php (line 0)
/home/virtwww/w_rubkrai-com-ua_6ae765ac/http/mg-core/mg-start.php (line 0)
/home/virtwww/w_rubkrai-com-ua_6ae765ac/http/index.php (line 98)