Mysql: How to update value in 27000 rows?


some member created 27000 posts in wrong section (lol :D) so i need to edit all his entries to get new section ID.

SELECT * FROM phpbb_topics WHERE topic_first_poster_name LIKE “%ozerway%”;

this will select all his topics…

the column with forum id is named “forum_id” and wrong value is 4, correct value should be 5

please kindly how the command should look like to update all these mysql rows forum_id from 4 to 5?

Thank you

UPDATE phpbb_topics 
   SET forum_id = 5
 WHERE topic_first_poster_name LIKE '%ozerway%'
   AND forum_id = 4