From 50fe064690fcacbfa83dcc9938e326006a904a7d Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 23 Nov 2023 14:04:31 +0800 Subject: [PATCH] * Fix bug that in aggregated query without GROUP BY. --- module/product/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/product/model.php b/module/product/model.php index 0af4716d83..d6a8bec09d 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -1608,10 +1608,12 @@ class productModel extends model $launchedStory = $this->dao->select('product, count(1) as launched')->from(TABLE_STORY) ->where('deleted')->eq(0) ->andWhere('status')->eq('launched') + ->groupBy('product') ->fetchPairs('product', 'launched'); $developingStory = $this->dao->select('product, count(1) as developing')->from(TABLE_STORY) ->where('deleted')->eq(0) ->andWhere('status')->eq('developing') + ->groupBy('product') ->fetchPairs('product', 'developing'); foreach($products as $productID => $product) {