Hello, I’m trying to bulk delete a bunch of posts, and I’d like to use a mySQL query to do this instead of the bulk delete option built into WordPress (don’t ask). The problem is that if I run a query to delete a row in the wp_posts table, it doesn’t update the corresponding values in the other tables. This means my count for a particular tag doesn’t decrement either, and my tag cloud remains unaffected by the deletion.
So I’m looking for a query I can run that will not only delete the latest post, but will also update the other table(s) correspondingly to change the count for the number of entries with a particular tag. I don’t need anything else updated (like comments or categories, because I have none), only the tag count.
Any mySQL gurus out there that can help me with this complex query? If so, I will give you a virtual high-five.
- The topic ‘Complex mySQL query to delete posts and update tag count’ is closed to new replies.