SimpleQuery: Ignore limit and offset when counting

This commit is contained in:
Johannes Meyer 2015-05-06 10:41:39 +02:00
parent 4044e56a03
commit 16a7b010bc

View File

@ -426,13 +426,15 @@ class SimpleQuery implements QueryInterface
} }
/** /**
* Count all rows of the result set * Count all rows of the result set, ignoring limit and offset
* *
* @return int * @return int
*/ */
public function count() public function count()
{ {
return $this->ds->count($this); $query = clone $this;
$query->limit(0, 0);
return $this->ds->count($query);
} }
/** /**