How can I update hundreds of rows at once?
Like:
UPDATE table SET a = ? WHERE b = ? AND c = 1
but for many rows. The ? parameters are arrays...
I read this answer but it uses CASE and I don't think I can do that...
Right now I have something like this:
foreach($values as $key => $value)
  $res = $pdo->prepare('UPDATE table SET a = ? WHERE b = ? AND c = 1');
  $res->execute(array($value, $key));
}
 
     
     
     
    