From b6dcfc07e2987c590c76cd6bc1fb546246f4f123 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 31 May 2024 10:51:31 +0800 Subject: [PATCH] * [bug#50453,done,0.2h] fix statistic project count issue. --- module/product/tao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/tao.php b/module/product/tao.php index 60014545ad..417de27425 100644 --- a/module/product/tao.php +++ b/module/product/tao.php @@ -545,7 +545,7 @@ class productTao extends productModel /* Get releases count. */ return $this->dao->select('COUNT(*) AS count')->from(TABLE_RELEASE)->where('deleted')->eq('0')->andWhere('product')->eq("$productID")->fetch('count'); case TABLE_PROJECTPRODUCT: - return $this->dao->select('COUNT(*) AS count') + return $this->dao->select('COUNT(DISTINCT(t1.project)) AS count') ->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t2.deleted')->eq('0')