eee
This commit is contained in:
+1
-2
@@ -155,7 +155,6 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
|
||||
public function count(): int
|
||||
{
|
||||
return $this->buildCommand($this->builder->count())->rowCount();
|
||||
return !$search ? 0 : current($search);
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +204,7 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
|
||||
*/
|
||||
public function exists(): bool
|
||||
{
|
||||
return $this->buildCommand($this->builder->one())->rowCount() > 0;
|
||||
return $this->buildCommand($this->limit(1)->builder->exists())->exists();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user