Skip to content

Commit fd1e93b

Browse files
authored
Merge pull request #2252 from searchy2/ray-batchupdatefix
QUICKFIX Batch Update Where Reset
2 parents 4a3011b + 329f295 commit fd1e93b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/Database/BaseBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2488,6 +2488,7 @@ public function updateBatch(array $set = null, string $index = null, int $batchS
24882488
// Batch this baby
24892489
$affected_rows = 0;
24902490
$savedSQL = [];
2491+
$savedQBWhere = $this->QBWhere;
24912492
for ($i = 0, $total = count($this->QBSet); $i < $total; $i += $batchSize)
24922493
{
24932494
$sql = $this->_updateBatch($table, array_slice($this->QBSet, $i, $batchSize), $this->db->protectIdentifiers($index)
@@ -2503,7 +2504,7 @@ public function updateBatch(array $set = null, string $index = null, int $batchS
25032504
$affected_rows += $this->db->affectedRows();
25042505
}
25052506

2506-
$this->QBWhere = [];
2507+
$this->QBWhere = $savedQBWhere;
25072508
}
25082509

25092510
$this->resetWrite();

0 commit comments

Comments
 (0)