diff options
author | dchill42 <dchill42@gmail.com> | 2012-10-23 04:59:09 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-10-23 04:59:09 +0200 |
commit | c2f59ef2d5d3ef28a113a11c24bee25eb03eeb56 (patch) | |
tree | f704c46f5a71c7267cbf15e706a744a36e3da208 /system/database/drivers/mysql | |
parent | cf99aac39914d821e8864443d3aaa759f87258e9 (diff) | |
parent | f5f898f8f30968fb36413a14de2dc6a4599b79a6 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into load_config_units
Diffstat (limited to 'system/database/drivers/mysql')
-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 99bf55942..ce9f73011 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -427,10 +427,10 @@ class CI_DB_mysql_driver extends CI_DB { * * @param string the table name * @param array the update data - * @param array the where clause + * @param string the where key * @return string */ - protected function _update_batch($table, $values, $index, $where = NULL) + protected function _update_batch($table, $values, $index) { $ids = array(); foreach ($values as $key => $val) @@ -454,9 +454,9 @@ class CI_DB_mysql_driver extends CI_DB { .'ELSE '.$k.' END, '; } - return 'UPDATE '.$table.' SET '.substr($cases, 0, -2) - .' WHERE '.(($where !== '' && count($where) > 0) ? implode(' ', $where).' AND ' : '') - .$index.' IN('.implode(',', $ids).')'; + $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE); + + return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } // -------------------------------------------------------------------- |