diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-28 13:10:30 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-28 13:10:30 +0200 |
commit | bcd0b3aad91e2faa18e6139bdee99c717759cafb (patch) | |
tree | c2143ad1dd2ef2d6588885b6625652dadbbdf9a5 | |
parent | 89db8ee4c16c5cdd589e51f27fcd3fc23cf41aae (diff) |
Fix Oracle limit() for pdo_oci
-rw-r--r-- | system/database/drivers/pdo/subdrivers/pdo_oci_driver.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index 2b36086ac..53f73436d 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -220,8 +220,8 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { */ protected function _limit($sql, $limit, $offset) { - return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($offset + $limit).')' - .($offset ? ' WHERE rnum >= '.$offset : ''); + return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($offset + $limit + 1).')' + .($offset ? ' WHERE rnum >= '.($offset + 1): ''); } } |