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


Ошибка в 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 (4620) or FIND_IN_SET(4620,p.`inside_cat`))) AND p.activity = 1 AND (temp.`varcount` > 0 OR temp.`varcount` < 0 OR p.count>0 OR p.count<0)
Lost connection to MySQL server during query


/var/www/profistroy.su/mg-core/models/catalog.php (line 205)


/var/www/profistroy.su/mg-core/controllers/catalog.php (line 166)


/var/www/profistroy.su/mg-core/lib/moguta.php (line 0)


/var/www/profistroy.su/mg-core/mg-start.php (line 0)


/var/www/profistroy.su/index.php (line 90)