admin管理员组

文章数量:1290422

So I don't have too much knowledge on SQL and running scripts, so I wanted to see if the community can help me.

Here is what I'm attempting to do:
Delete all post_meta that has the meta_keys honorific, suffix and nickname.

Here is my attempt which didn't work for single site (One single wp_postmeta table):

DELETE FROM `wp_postmeta` 
WHERE `meta_key` LIKE 'honorific' 
AND `meta_key` LIKE 'suffix'
AND `meta_key` LIKE 'nickname'

When I do just the single post_meta, it works as shown below:

DELETE FROM `wp_postmeta` 
WHERE `meta_key` LIKE 'honorific' 

Also, how can I achieve the same as above but on WP multi-sites?

So let's say that in the DB, I have wp_10_postmeta, wp_11_postmeta, wp_12_postmeta and so on?

All help is appreciated!

本文标签: postsSQL DELETE multiple postmeta on single and multisites