summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-07-31 12:48:59 +0200
committerAndrey Andreev <narf@devilix.net>2015-07-31 12:48:59 +0200
commit0d2d84f173910df67ace4dcdb2032478b62b9e68 (patch)
treed8abc712a4122e371ca841c47526ea5390f8ed31 /system
parent948cefc49f470b2a82422f6c4fdc8cfb02c8f86a (diff)
Fix #4012
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_query_builder.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 293419e23..7f3334763 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -807,7 +807,10 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$where_in = array_values($values);
}
- $prefix = (count($this->qb_where) === 0) ? $this->_group_get_type('') : $this->_group_get_type($type);
+ $prefix = (count($this->qb_where) === 0 && count($this->qb_cache_where) === 0)
+ ? $this->_group_get_type('')
+ : $this->_group_get_type($type);
+
$where_in = array(
'condition' => $prefix.$key.$not.' IN('.implode(', ', $where_in).')',
'escape' => $escape