diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-06-04 16:28:23 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-06-04 16:28:23 +0200 |
commit | 3902e383b41c6c0ef77b65e95d451cb2ea3d85db (patch) | |
tree | eb2adb1cf4f1dea1e4d14c69a3f1a275b14cff08 /system/database/drivers/mysql/mysql_driver.php | |
parent | fd2ceab417bbb696134910ce0eaeca34bea3e1e5 (diff) | |
parent | fc11dcc82cefa7299e6f8c74d0e005ebb6fa568c (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
Diffstat (limited to 'system/database/drivers/mysql/mysql_driver.php')
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 7a1a7b9a2..5937b223b 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 ( ! empty($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).')'; } |