sql query for approving moderated posted?

Kaiser

Well-known member
Well I just did a import of another forum db into my forum, and I have 300+ something moderated posts so is there a sql query I can run to approve all the posts?

Edit: Looks like I messed up on the title :P
 
Don't forget the xf_moderation_queue records. You would need to run these two queries to approve all moderated posts (borrowing Mikey's query):

Code:
DELETE
FROM xf_moderation_queue
WHERE content_type = 'post';

UPDATE xf_post
SET message_state = 'visible'
WHERE message_state = 'moderated';

And here are the queries to approve all moderated threads (per this post):

Code:
DELETE
FROM xf_moderation_queue
WHERE content_type = 'thread';

UPDATE xf_thread
SET discussion_state = 'visible'
WHERE discussion_state = 'moderated';

You also need to run this query to reset the count in the moderator bar (per this post):

Code:
DELETE
FROM xf_data_registry
WHERE data_key = 'moderationCounts';
 
Top Bottom