summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mysql')
-rw-r--r--system/database/drivers/mysql/mysql_driver.php12
-rw-r--r--system/database/drivers/mysql/mysql_forge.php2
-rw-r--r--system/database/drivers/mysql/mysql_utility.php8
3 files changed, 11 insertions, 11 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 7a1a7b9a2..41e86f315 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -68,7 +68,7 @@ class CI_DB_mysql_driver extends CI_DB {
{
parent::__construct($params);
- if ($this->port != '')
+ if ($this->port !== '')
{
$this->hostname .= ':'.$this->port;
}
@@ -337,7 +337,7 @@ class CI_DB_mysql_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_mysql_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_mysql_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];
}
@@ -467,7 +467,7 @@ class CI_DB_mysql_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).')';
}
@@ -485,7 +485,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
protected function _limit($sql, $limit, $offset)
{
- return $sql.' LIMIT '.($offset == 0 ? '' : $offset.', ').$limit;
+ return $sql.' LIMIT '.($offset === 0 ? '' : $offset.', ').$limit;
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index 0e39affa7..ffd374fbf 100644
--- a/system/database/drivers/mysql/mysql_forge.php
+++ b/system/database/drivers/mysql/mysql_forge.php
@@ -178,7 +178,7 @@ class CI_DB_mysql_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) : '');
}
}
diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php
index 642323dbd..643682fde 100644
--- a/system/database/drivers/mysql/mysql_utility.php
+++ b/system/database/drivers/mysql/mysql_utility.php
@@ -76,7 +76,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
// Write out the table schema
$output .= '#'.$newline.'# TABLE STRUCTURE FOR: '.$table.$newline.'#'.$newline.$newline;
- if ($add_drop == TRUE)
+ if ($add_drop === TRUE)
{
$output .= 'DROP TABLE IF EXISTS '.$this->db->protect_identifiers($table).';'.$newline.$newline;
}
@@ -92,7 +92,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
}
// If inserts are not needed we're done...
- if ($add_insert == FALSE)
+ if ($add_insert === FALSE)
{
continue;
}
@@ -100,7 +100,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
// Grab all the data from the current table
$query = $this->db->query('SELECT * FROM '.$this->db->protect_identifiers($table));
- if ($query->num_rows() == 0)
+ if ($query->num_rows() === 0)
{
continue;
}
@@ -143,7 +143,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
else
{
// Escape the data if it's not an integer
- $val_str .= ($is_int[$i] == FALSE) ? $this->db->escape($v) : $v;
+ $val_str .= ($is_int[$i] === FALSE) ? $this->db->escape($v) : $v;
}
// Append a comma