From c9b924c1498847d8f324d81c8994fff0b95f26dc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 19 Jul 2012 13:06:02 +0300 Subject: Remove _limit()'s extra parameters and qb_limit, qb_offset unneeded typecasts + add _compile_group_by() method --- system/database/drivers/oci8/oci8_driver.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'system/database/drivers/oci8/oci8_driver.php') diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index a0f26c257..dcc46527c 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -617,7 +617,7 @@ class CI_DB_oci8_driver extends CI_DB { { if ($this->qb_limit) { - $this->where('rownum <= ', (int) $this->qb_limit, FALSE); + $this->where('rownum <= ',$this->qb_limit, FALSE); $this->qb_limit = FALSE; } @@ -632,15 +632,13 @@ class CI_DB_oci8_driver extends CI_DB { * Generates a platform-specific LIMIT clause * * @param string the sql query string - * @param int the number of rows to limit the query to - * @param int the offset value * @return string */ - protected function _limit($sql, $limit, $offset) + protected function _limit($sql) { $this->limit_used = TRUE; - return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($offset + $limit + 1).')' - .($offset ? ' WHERE rnum >= '.($offset + 1): ''); + return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($this->qb_offset + $this->qb_limit + 1).')' + .($this->qb_offset ? ' WHERE rnum >= '.($this->qb_offset + 1): ''); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b