summaryrefslogtreecommitdiffstats
path: root/system/database/DB_query_builder.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-04-23 13:26:49 +0200
committerAndrey Andreev <narf@devilix.net>2018-04-23 13:27:35 +0200
commitb070d923fee349b36c16010da3ff3c0222dddec3 (patch)
tree07ee9fa53511522e1fcacbc087c9689df1595bc6 /system/database/DB_query_builder.php
parentd85c048f076246dc30f1d8ee0270c6b95ee25ba5 (diff)
[ci skip] Merge pull request #5471 from toonitw/patch-1
The value of limit can be zero
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r--system/database/DB_query_builder.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 5c0528a3f..3d0c329b0 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -2215,7 +2215,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 : '');
}
// --------------------------------------------------------------------
@@ -2365,7 +2365,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");
}