I'm looking for a simple SQL script that will delete posts where the post meta of that post id has some value ['x'].
DELETE FROM wp_posts WHERE post_id == wp_post_meta->post_id WHERE meta_value = ['x']
|
I'm looking for a simple SQL script that will delete posts where the post meta of that post id has some value ['x']. DELETE FROM wp_posts WHERE post_id == wp_post_meta->post_id WHERE meta_value = ['x'] |
|||
|
|||
|
|
WP_Queryand then iterating through them...mostly because handtyped sql is easy (for me at least) to botch. Kudos if you got it though. – m0r7if3r Jan 10 '12 at 20:22