So i have a insert query with multiple rows (1 000 row per query) and it work fine, so tried to make the same for update query but i didn't find any solution,
this is my code :
$sth = $db->prepare("UPDATE table SET salutation = ? , fnamn = ? , enamn = ? , mob = ? WHERE id = ?");
for ($i=0; $i < count($recipents); $i++) {
if(isset($recipents[$i]['id']))
$sth->execute(array($recipents[$i]['salutation'], $recipents[$i]['fnamn'], $recipents[$i]['enamn'], $recipents[$i]['mob'],$recipents[$i]['id']));
}
so please if someone has any idea how to update multiple rows in one query i will be very appreciative.