品牌页统计bug

2016-07-07 15:49 来源:www.chinab4c.com 作者:ecshop专家

brand.php页面,显示品牌下商品数量时,把删除的也算进去了
第338行
$sql = "SELECT c.cat_id, c.cat_name, COUNT(g.goods_id) AS goods_count FROM ".
$GLOBALS['ecs']->table('category'). " AS c, ".
$GLOBALS['ecs']->table('goods') . " AS g " .
"WHERE g.brand_id = '$brand' AND c.cat_id = g.cat_id AND g.is_delete=0 ".
"GROUP BY g.cat_id";
需加上粗体部分