summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli
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/mysqli
parented944a3c70a0bad158cd5a6ca5ce1f2e717aff5d (diff)
Replaced `==` with `===` and `!=` with `!==` in /system/database
Diffstat (limited to 'system/database/drivers/mysqli')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php14
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php2
2 files changed, 8 insertions, 8 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index dd544f686..5814aceb9 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -71,7 +71,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
public function db_connect()
{
- return ($this->port != '')
+ return ($this->port !== '')
? @new mysqli($this->hostname, $this->username, $this->password, $this->database, $this->port)
: @new mysqli($this->hostname, $this->username, $this->password, $this->database);
}
@@ -91,7 +91,7 @@ class CI_DB_mysqli_driver extends CI_DB {
return $this->db_connect();
}
- return ($this->port != '')
+ return ($this->port !== '')
? @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database, $this->port)
: @new mysqli('p:'.$this->hostname, $this->username, $this->password, $this->database);
}
@@ -337,7 +337,7 @@ class CI_DB_mysqli_driver extends CI_DB {
{
$sql = 'SHOW TABLES FROM '.$this->_escape_char.$this->database.$this->_escape_char;
- if ($prefix_limit !== FALSE && $this->dbprefix != '')
+ if ($prefix_limit !== FALSE && $this->dbprefix !== '')
{
return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'";
}
@@ -370,7 +370,7 @@ class CI_DB_mysqli_driver extends CI_DB {
*/
public function field_data($table = '')
{
- if ($table == '')
+ if ($table === '')
{
return ($this->db_debug) ? $this->display_error('db_field_param_missing') : FALSE;
}
@@ -451,7 +451,7 @@ class CI_DB_mysqli_driver extends CI_DB {
foreach (array_keys($val) as $field)
{
- if ($field != $index)
+ if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
@@ -466,10 +466,10 @@ class CI_DB_mysqli_driver extends CI_DB {
.'ELSE '.$k.' END, ';
}
- $where = ($where != '' && count($where) > 0) ? implode(' ', $where).' AND ' : '';
+ $where = ($where !== '' && count($where) > 0) ? implode(' ', $where).' AND ' : '';
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).')';
}
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 503574dfc..b00bfde49 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -179,7 +179,7 @@ class CI_DB_mysqli_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) : '');
}
}