diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-12 11:14:09 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-12 11:14:09 +0200 |
commit | 9d3aa1bc9f09c226ce0a55c285cb7fe808db5fa7 (patch) | |
tree | d1018214c7fc9e6c0f51a2a7c992f71f767e723c /system/database/DB_query_builder.php | |
parent | bffe3fb935c8a28e1ccacf56f678a491edcff043 (diff) |
Fix _get_operator() for 'LIKE expr ESCAPE'
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r-- | system/database/DB_query_builder.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 139f467e6..9c6cb7e45 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -2050,8 +2050,6 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { if (count($this->$qb_key) > 0) { - $sql = ($qb_key === 'qb_having') ? "\nHAVING " : "\nWHERE "; - for ($i = 0, $c = count($this->$qb_key); $i < $c; $i++) { if ($this->{$qb_key}[$i]['escape'] === FALSE) @@ -2081,7 +2079,8 @@ abstract class CI_DB_query_builder extends CI_DB_driver { .' '.trim($matches[4]).$matches[5].$matches[6]; } - return implode("\n", $this->$qb_key); + return ($qb_key === 'qb_having' ? "\nHAVING " : "\nWHERE ") + .implode("\n", $this->$qb_key); } return ''; |