Remove wrong limit parameter from count query in compatibility function

This commit is contained in:
Bart Visscher 2013-04-06 17:58:47 +02:00
parent e824c6cffa
commit 142b020d38
1 changed files with 1 additions and 1 deletions

View File

@ -1077,7 +1077,7 @@ class PDOStatementWrapper{
public function numRows() {
$regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i';
if (preg_match($regex, $this->statement->queryString, $output) > 0) {
$query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}", PDO::FETCH_NUM);
$query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}");
return $query->execute($this->lastArguments)->fetchColumn();
}else{
return $this->statement->rowCount();