summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-10-23 04:59:09 +0200
committerdchill42 <dchill42@gmail.com>2012-10-23 04:59:09 +0200
commitc2f59ef2d5d3ef28a113a11c24bee25eb03eeb56 (patch)
treef704c46f5a71c7267cbf15e706a744a36e3da208 /system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
parentcf99aac39914d821e8864443d3aaa759f87258e9 (diff)
parentf5f898f8f30968fb36413a14de2dc6a4599b79a6 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into load_config_units
Diffstat (limited to 'system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index a54311712..0fb5d8f12 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -164,10 +164,10 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* @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)
@@ -191,9 +191,9 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
.'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');
}
// --------------------------------------------------------------------