This commit is contained in:
2024-04-26 15:25:12 +08:00
parent 722b286f91
commit 3a39eaabf4
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -154,9 +154,7 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
*/
public function count(): int
{
$clone = clone $this;
$clone->select(['count(*)']);
$search = $clone->buildCommand($clone->builder->count())->one();
$search = $this->buildCommand($this->builder->count())->one();
return !$search ? 0 : current($search);
}