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


Ошибка в 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 (30) or FIND_IN_SET(30,p.`inside_cat`))) AND p.activity = 1 AND (SELECT IF(SUM(ipv.count) != 0, ip.count + SUM(ipv.count), IF(COUNT(ipv.id) != 0, SUM(ipv.count), ip.count)) FROM mg_product AS ip LEFT JOIN mg_product_variant AS ipv ON ip.id = ipv.product_id WHERE ip.id = p.id) != 0
Out of memory (Needed 4194288 bytes)


/home/virtwww/w_kengurukr_c1101a63/http/mg-core/models/catalog.php (line 210)


/home/virtwww/w_kengurukr_c1101a63/http/mg-core/controllers/catalog.php (line 168)


/home/virtwww/w_kengurukr_c1101a63/http/mg-core/lib/moguta.php (line 0)


/home/virtwww/w_kengurukr_c1101a63/http/mg-core/mg-start.php (line 0)


/home/virtwww/w_kengurukr_c1101a63/http/index.php (line 90)