summaryrefslogtreecommitdiffstats
path: root/system/database/DB_query_builder.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-06-14 20:56:36 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-06-14 20:56:36 +0200
commitfb56cdb3efd11f4ec6cf053b8f04cc51a7d3bd4e (patch)
treefd81b4a7064f3dba7bdfadbd7a29424539cef324 /system/database/DB_query_builder.php
parentf34668f94b6a69fa777c6025ccc798b5e3c1110f (diff)
parent30e2eafa86c4c7b6b39cea3e7089a90df9f603fb (diff)
Merge tag '3.1.9' of git://github.com/bcit-ci/CodeIgniter into dev
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r--system/database/DB_query_builder.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 8f477e3a1..3d0c329b0 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -970,7 +970,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$v = "'{$v}'";
break;
case 'before':
- $v = "%'{$v}'";
+ $v = "'%{$v}'";
break;
case 'after':
$v = "'{$v}%'";
@@ -987,7 +987,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$v .= sprintf($this->_like_escape_str, $this->_like_escape_chr);
}
- $qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE", 'value' => $v, 'escape' => $escape);
+ $qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE {$v}", 'value' => NULL, 'escape' => $escape);
$this->qb_where[] = $qb_where;
if ($this->qb_caching === TRUE)
{
@@ -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");
}