summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-28 13:10:30 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-28 13:10:30 +0200
commitbcd0b3aad91e2faa18e6139bdee99c717759cafb (patch)
treec2143ad1dd2ef2d6588885b6625652dadbbdf9a5
parent89db8ee4c16c5cdd589e51f27fcd3fc23cf41aae (diff)
Fix Oracle limit() for pdo_oci
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_driver.php4
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): '');
}
}