summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorSoesapto Joeni Hantoro <shidec00@yahoo.com>2012-05-15 11:28:16 +0200
committerSoesapto Joeni Hantoro <shidec00@yahoo.com>2012-05-15 11:28:16 +0200
commitd2574db779d97f2a1ff8351b5a7c31c028601e17 (patch)
tree991847c5eebc39335e3d530cb5f86b8f0271e6e4 /system
parentf79bdda8d823495b1f6524bd0cafb985860b7331 (diff)
Escaping boolean data type for postgre
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 915763ad7..4b2fb7a9e 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -327,7 +327,7 @@ class CI_DB_postgre_driver extends CI_DB {
}
elseif (is_bool($str))
{
- return $str ? "TRUE" : "FALSE";
+ return ($str) ? 'TRUE' : 'FALSE';
}
elseif (is_null($str))
{
@@ -629,7 +629,7 @@ class CI_DB_postgre_driver extends CI_DB {
$k = $this->protect_identifiers($k, FALSE, $escape);
$v = ' '.$this->escape($v);
}
- else if (is_bool($v))
+ elseif (is_bool($v))
{
$v = ' '.($v ? 'TRUE' : 'FALSE');
}