eee
This commit is contained in:
+3
-1
@@ -154,7 +154,9 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
$search = $this->buildCommand((clone $this)->select(['count(*)'])->builder->count())->one();
|
||||
$clone = clone $this;
|
||||
$clone->select(['count(*)']);
|
||||
$search = $clone->buildCommand($clone->builder->count())->one();
|
||||
return !$search ? 0 : current($search);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user