diff options
author | Andrey Andreev <narf@devilix.net> | 2016-07-29 10:42:28 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-07-29 10:42:28 +0200 |
commit | acc6481807fc9cac56b7c1de16239d98af711575 (patch) | |
tree | f672134fbe7828b45ec3e826185353704015610f /system | |
parent | b9f53a8d7a96bad5c6f1ff7e41a075fcb5d8fb5c (diff) |
Fix #4737
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_query_builder.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 713bf18f3..7a008eeb8 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1271,7 +1271,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { */ protected function _limit($sql) { - return $sql.' LIMIT '.($this->qb_offset ? $this->qb_offset.', ' : '').$this->qb_limit; + return $sql.' LIMIT '.($this->qb_offset ? $this->qb_offset.', ' : '').(int) $this->qb_limit; } // -------------------------------------------------------------------- @@ -2340,7 +2340,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { .$this->_compile_order_by(); // ORDER BY // LIMIT - if ($this->qb_limit) + if ($this->qb_limit OR $this->qb_offset) { return $this->_limit($sql."\n"); } |