diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-03-09 11:08:36 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-03-09 11:08:36 +0100 |
commit | 93ca71552d9a3e28eeaa00dd10755d20b2cbf32e (patch) | |
tree | 660233f2ec631e5730731491d2fd244fe15f7df8 /system/database/drivers/mysql/mysql_driver.php | |
parent | a9924b8352aa18869677bea0182c45e2a7e2ce37 (diff) | |
parent | 2f8b27efeb0a39c24eddf89cf31ea0fd113a6b71 (diff) |
Merged recent Core changes and fixed conflict.
Diffstat (limited to 'system/database/drivers/mysql/mysql_driver.php')
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index df18c912e..4ff9b0a11 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -286,13 +286,13 @@ class CI_DB_mysql_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) - { + foreach ($str as $key => $val) + { $str[$key] = $this->escape_str($val, $like); - } + } - return $str; - } + return $str; + } if (function_exists('mysql_real_escape_string') AND is_resource($this->conn_id)) { @@ -590,9 +590,9 @@ class CI_DB_mysql_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { - $valstr[] = $key." = ".$val; + $valstr[] = $key . ' = ' . $val; } $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; @@ -627,11 +627,11 @@ class CI_DB_mysql_driver extends CI_DB { $ids = array(); $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - foreach($values as $key => $val) + foreach ($values as $key => $val) { $ids[] = $val[$index]; - foreach(array_keys($val) as $field) + foreach (array_keys($val) as $field) { if ($field != $index) { @@ -643,7 +643,7 @@ class CI_DB_mysql_driver extends CI_DB { $sql = "UPDATE ".$table." SET "; $cases = ''; - foreach($final as $k => $v) + foreach ($final as $k => $v) { $cases .= $k.' = CASE '."\n"; foreach ($v as $row) |