From b6c57013a973940d47c683e9570f6c33fa76bf8d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 26 Jun 2025 17:32:48 +0800 Subject: [PATCH] * [refac bug #63694] Adjust code for code review. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 4ca35a5302..672dceabce 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1083,7 +1083,7 @@ class actionModel extends model */ public function getDynamicByProduct(int $productID, string $account = 'all', string $period = 'all', string $orderBy = 'date_desc', int $limit = 50, string $date = '', string $direction = 'next'): array { - $count = $this->dao->select('count(1) as count')->from(TABLE_ACTIONPRODUCT)->where('product')->eq($productID)->fetch('count'); + $count = $this->dao->select('COUNT(1) AS count')->from(TABLE_ACTIONPRODUCT)->where('product')->eq($productID)->fetch('count'); if($count > 10000) $this->productAlias = 't2 FORCE INDEX (action_product)'; return $this->getDynamic($account, $period, $orderBy, $limit, (int)$productID, 'all', 'all', $date, $direction);