summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorSoesapto Joeni Hantoro <shidec00@yahoo.com>2012-05-11 06:18:38 +0200
committerSoesapto Joeni Hantoro <shidec00@yahoo.com>2012-05-11 06:18:38 +0200
commitb01d96f65a78528323b3917eec31c4ed8b58eb7b (patch)
treef18abe72f65e173f0ff1ba702710a0df1f79653a /system
parentd41f423528b21d97ff0eb268e10947b257f5a90e (diff)
simpler script, add boolean handling on DB_driver/escape
Diffstat (limited to 'system')
-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))