FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Mass Approval and Moving of Messages with SQL?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Mass Approval and Moving of Messages with SQL? [message #35943] Thu, 22 February 2007 13:26 Go to next message
appscontent   United States
Messages: 33
Registered: November 2006
Karma: 0
Member
I have successfully converted and loaded historical data via an API. The messages appear in the moderation queue and are awaiting approval.

My requirement ... mass approve the 14,000+ messages still appearing in the queue while additionally have them moved to a new forum that will hold just the unedited, archived data.

I am looking for confirmation and help with the SQL since I am not really a technical person. I believe I need to do the following:

1. query all rows in FUD26_MSG where APR = 0 and set APR=1

2. for each row changed above, also change the column that holds the foreign key to FUD26_FORUM.

Looking at my raw data, I see that column FILE_ID in FUD26_MSG may be the field I also need to change. My question is this ... my FORUM_ID values are 4, 5, 6, etc. yet FILE_ID = 40000, 50000, 60000, etc.

a. Is this the right column to change? If I wanted to move a message in forum 4 to forum 5 would I change FILE_ID from 400000 to 500000?

3. Run the consistency checker after executing and committing the SQL


Is my analysis correct?

Could anyone write the simple SQL to do this so I can verify if my is correct?
Re: Mass Approval and Moving of Messages with SQL? [message #35949 is a reply to message #35943] Fri, 23 February 2007 00:40 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
To move messages from one forum to another you need to update the forum_id field inside the threads table the either run the consistency checker or run the rebuild_forum_view() function for the source & destination forums.

As far as approving message changing apr from 0 to 1 will do the trick.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to prevent session expiry
Next Topic: make the grid lines turn black
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 02 23:48:17 GMT 2024

Total time taken to generate the page: 0.02078 seconds