summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
authorAlex Bilbie <alex@alexbilbie.com>2012-06-02 12:09:54 +0200
committerAlex Bilbie <alex@alexbilbie.com>2012-06-02 12:09:54 +0200
commit48a2baf0e288accd206f5da5031d29076e130792 (patch)
tree9f2f0130ae05cfbe8301ab29cbbb2d389cc7c65f /system/database/drivers/postgre
parented944a3c70a0bad158cd5a6ca5ce1f2e717aff5d (diff)
Replaced `==` with `===` and `!=` with `!==` in /system/database
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php14
-rw-r--r--system/database/drivers/postgre/postgre_forge.php2
2 files changed, 8 insertions, 8 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index c2a188416..8c5168400 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -356,13 +356,13 @@ class CI_DB_postgre_driver extends CI_DB {
$table = (func_num_args() > 0) ? func_get_arg(0) : NULL;
$column = (func_num_args() > 1) ? func_get_arg(1) : NULL;
- if ($table == NULL && $v >= '8.1')
+ if ($table === NULL && $v >= '8.1')
{
$sql = 'SELECT LASTVAL() AS ins_id';
}
- elseif ($table != NULL)
+ elseif ($table !== NULL)
{
- if ($column != NULL && $v >= '8.0')
+ if ($column !== NULL && $v >= '8.0')
{
$sql = 'SELECT pg_get_serial_sequence(\''.$table."', '".$column."') AS seq";
$query = $this->query($sql);
@@ -401,7 +401,7 @@ class CI_DB_postgre_driver extends CI_DB {
{
$sql = "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'";
- if ($prefix_limit !== FALSE && $this->dbprefix != '')
+ if ($prefix_limit !== FALSE && $this->dbprefix !== '')
{
return $sql." AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr);
}
@@ -528,7 +528,7 @@ class CI_DB_postgre_driver extends CI_DB {
foreach (array_keys($val) as $field)
{
- if ($field != $index)
+ if ($field !== $index)
{
$final[$field][] = 'WHEN '.$val[$index].' THEN '.$val[$field];
}
@@ -544,7 +544,7 @@ class CI_DB_postgre_driver extends CI_DB {
}
return 'UPDATE '.$table.' SET '.substr($cases, 0, -2)
- .' WHERE '.(($where != '' && count($where) > 0) ? implode(' ', $where).' AND ' : '')
+ .' WHERE '.(($where !== '' && count($where) > 0) ? implode(' ', $where).' AND ' : '')
.$index.' IN('.implode(',', $ids).')';
}
@@ -585,7 +585,7 @@ class CI_DB_postgre_driver extends CI_DB {
*/
protected function _limit($sql, $limit, $offset)
{
- return $sql.' LIMIT '.$limit.($offset == 0 ? '' : ' OFFSET '.$offset);
+ return $sql.' LIMIT '.$limit.($offset === 0 ? '' : ' OFFSET '.$offset);
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index 94c97af50..af1c45f9b 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -214,7 +214,7 @@ class CI_DB_postgre_forge extends CI_DB_forge {
}
return $sql.$this->_process_fields($fields)
- .($after_field != '' ? ' AFTER '.$this->db->protect_identifiers($after_field) : '');
+ .($after_field !== '' ? ' AFTER '.$this->db->protect_identifiers($after_field) : '');
}
}