summaryrefslogtreecommitdiffstats
path: root/system/database/DB_query_builder.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r--system/database/DB_query_builder.php18
1 files changed, 4 insertions, 14 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 969a25acb..8fa67ea06 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -432,26 +432,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$k .= ' IS NULL';
}
- if ( is_bool($v))
+ if ( ! is_null($v))
{
if ($escape === TRUE)
{
$k = $this->protect_identifiers($k, FALSE, $escape);
-
- $v = ' '.($v ? 'TRUE' : 'FALSE');
+ $v = ' '.$this->escape($v);
}
-
- if ( ! $this->_has_operator($k))
+ else if (is_bool($v))
{
- $k .= ' =';
- }
- }
- else if ( ! is_null($v))
- {
- if ($escape === TRUE)
- {
- $k = $this->protect_identifiers($k, FALSE, $escape);
- $v = ' '.$this->escape($v);
+ $v = ' '.($v ? 'TRUE' : 'FALSE');
}
if ( ! $this->_has_operator($k))