How to update mysql data in bulk ? How to define something like this :
UPDATE `table` WHERE `column1` = somevalues SET `column2` = othervalues
If you have data in array format then try this
and your query is like "UPDATE table WHERE column1 = ? SET column2 = ?"
"UPDATE table WHERE column1 = ? SET column2 = ?"
then set it like below
foreach($data as $key => $value) { $query->bind_param('ss', $key, $value); $query->execute(); }
hope it'll work.
Reference from this.