summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJehong Ahn <jehong.ahn@hamee.co.jp>2018-04-12 09:36:38 +0200
committerJehong Ahn <jehong.ahn@hamee.co.jp>2018-04-12 09:36:38 +0200
commit69ce2fe4843ccb14ae2c2aa8db37f57841d3f231 (patch)
treebcdb208f5a3b1e627752ae9f9f91f802bdba275c
parentc243df3af851fe90cd272f3958f7eb7bf76173b1 (diff)
qb_limit can be zero
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/database/DB_query_builder.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 037be739e..c213bc280 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1469,7 +1469,7 @@ abstract class CI_DB_driver {
return 'UPDATE '.$table.' SET '.implode(', ', $valstr)
.$this->_compile_wh('qb_where')
.$this->_compile_order_by()
- .($this->qb_limit ? ' LIMIT '.$this->qb_limit : '');
+ .(($this->qb_limit !== FALSE) ? ' LIMIT '.$this->qb_limit : '');
}
// --------------------------------------------------------------------
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 744c4970e..77f6cfe89 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -2287,7 +2287,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
protected function _delete($table)
{
return 'DELETE FROM '.$table.$this->_compile_wh('qb_where')
- .($this->qb_limit ? ' LIMIT '.$this->qb_limit : '');
+ .(($this->qb_limit !== FALSE) ? ' LIMIT '.$this->qb_limit : '');
}
// --------------------------------------------------------------------
@@ -2437,7 +2437,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
.$this->_compile_order_by(); // ORDER BY
// LIMIT
- if ($this->qb_limit OR $this->qb_offset)
+ if ($this->qb_limit !== FALSE OR $this->qb_offset)
{
return $this->_limit($sql."\n");
}