This commit is contained in:
2024-04-26 15:26:10 +08:00
parent 3a39eaabf4
commit 71766ee914
+1 -1
View File
@@ -154,7 +154,7 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
*/ */
public function count(): int public function count(): int
{ {
$search = $this->buildCommand($this->builder->count())->one(); return $this->buildCommand($this->builder->count())->rowCount();
return !$search ? 0 : current($search); return !$search ? 0 : current($search);
} }