I'm trying to update tables in my wordpress mu database. I want to update all wp_options tables. These tables are named like this:
- wp_1_options
- wp_2_options
- ...and so on.
How do i affect all tables with wp_any-character-here_options? I tried to query for:
UPDATE wp_%_options
SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com')
WHERE option_name = 'home' OR option_name = 'siteurl';
...but mysql complains i have error in syntax...