Skip to content

Commit ff55a19

Browse files
committed
[BUGFIX] Limit/Offset done by dbase server - prevent full execution
1 parent 40a4835 commit ff55a19

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/vendor/creole/drivers/mssqlsrv/MSSQLSRVPreparedStatement.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ public function executeQuery($p1 = null, $fetchmode = null)
7878
$this->updateCount = null; // reset
7979
$sql = $this->replaceParams();
8080

81+
if ($this->limit > 0 || $this->offset > 0) {
82+
$this->conn->applyLimit($sql, $this->offset, $this->limit);
83+
}
84+
8185
$this->resultSet = $this->conn->executeQuery($sql, $fetchmode);
82-
$this->resultSet->_setOffset($this->offset);
83-
$this->resultSet->_setLimit($this->limit);
8486
return $this->resultSet;
8587
}
8688

0 commit comments

Comments
 (0)