Remove wrong limit parameter from count query in compatibility function
This commit is contained in:
parent
e824c6cffa
commit
142b020d38
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue