I am trying to update a table that has more than 400 rows. I am trying to update the entire table! Each and every row need to be updated to a new value. So, I think of doing a loop in php that will generate the required UPDATE statements and fire them to the database one by one.
I feel like that will be harsh to the database and some of them might be lost. Am I right in that? or is it OK to do it this way? and if not, what other way I can do it? Is there a way to make all the update in one query which can be fire once?
Other thought is, creating a big SQL statement that has all the UPDATE statements inside it. But is MySQL support multiply update in one statement?
Thank you in advance.