How to mass-change custom field content with phpMyAdmin?
-
Hi. I need to mass-change the content of several custom fields; I’m told phpMyAdmin is the best way to do this.
For example, for posts in category #4, I need to change the content of the syndication_source field from…
Yahoo! News Results for "john doe"
… to …
Domain.co.uk
With help, I cobbled together these queries…
select * from wp_postmeta where post_id in ( select post_id from wp_post2cat where category_id = '4' );
update wp_postmeta set meta_value = 'Mydomain.co.uk' where meta_value = 'Yahoo! News Results for \"john doe\"' and post_id in ( select post_id from wp_post2cat where category_id = '4' )However – whilst the query executes successfully, I am not seeing any change take effect and phpMyAdmin reports: “# MySQL returned an empty result set (i.e. zero rows).”
Can anyone help me construct a query set to accomplish this? I’m also going to want to do similar for custom fields like syndication_permalink, which is a URL.
Note that the posts I’m talking about above in category #4 may also belong to other categories.
Thanks
- The topic ‘How to mass-change custom field content with phpMyAdmin?’ is closed to new replies.