summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-12-12 13:17:52 +0100
committerAndrey Andreev <narf@devilix.net>2016-12-12 13:17:52 +0100
commit8338bbb3586e31432caa503b6530dcea583dd8d8 (patch)
treebbdbeb24c710f56be97db10e6f914383629ef82e /system/database/drivers/pdo/pdo_driver.php
parentf2a613d67c23ba253f35a73d208e0dcaf6080b40 (diff)
Fix #4892 - update_batch()
Regression caused by 0c23e9122666a30797079bea9415da135d4f7e12 trying to fix #4871 Supersedes #4929
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index c27607e55..2da9cf38f 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -311,52 +311,6 @@ class CI_DB_pdo_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Update_Batch statement
- *
- * Generates a platform-specific batch update string from the supplied data
- *
- * @param string $table Table name
- * @param array $values Update data
- * @param string $index WHERE key
- * @return string
- */
- protected function _update_batch($table, $values, $index)
- {
- $ids = array();
- foreach ($values as $key => $val)
- {
- $ids[] = $val[$index];
-
- foreach (array_keys($val) as $field)
- {
- if ($field !== $index)
- {
- $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
- }
- }
- }
-
- $cases = '';
- foreach ($final as $k => $v)
- {
- $cases .= $k.' = CASE '."\n";
-
- foreach ($v as $row)
- {
- $cases .= $row."\n";
- }
-
- $cases .= 'ELSE '.$k.' END, ';
- }
-
- $this->where($index.' IN('.implode(',', $ids).')', NULL, FALSE);
-
- return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where');
- }
-
- // --------------------------------------------------------------------
-
- /**
* Truncate statement
*
* Generates a platform-specific truncate string from the supplied data