From e2a562107d55a31b8f310130229232f296c2157a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 20 Apr 2021 11:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/ActiveQuery.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Database/ActiveQuery.php b/Database/ActiveQuery.php index 7823512e..8a8c1786 100644 --- a/Database/ActiveQuery.php +++ b/Database/ActiveQuery.php @@ -257,6 +257,7 @@ class ActiveQuery extends Component implements ISqlBuilder */ public function count(): int { + $this->select = ['COUNT(*)']; $data = $this->execute($this->builder->count())->one(); if ($data && is_array($data)) { return (int)array_shift($data);