PDA

View Full Version : Moving threads from one forum to another using MySQL


desirulez
08-25-2013, 01:19 PM
Hello

For some reasons I have to move certain threads from one forum to another using MySQL. I wrote this query which does the work, but I am not sure if that's a perfect way to do it or you have to update other tables too. Any help will be appreciated. Here's my query:

UPDATE thread
SET forumid = xx
WHERE threadid IN (xxxx, xxxx, xxxx, threadids, xxx...);

ozzy47
08-25-2013, 01:26 PM
Is their a reason you can not use the Moderation Tools to move them?

Paul M
08-25-2013, 01:52 PM
That query will do it just fine.

You should run the update forum counters afterwards to correct forum totals.

(I would also echo the question above).

desirulez
08-25-2013, 01:54 PM
There are lots of threads and I have to move them to many different forums. I have thread ids already and to which forums they need to be moved to. That's the reaon I want to do it by running queries. Moderation tools will take ages.

--------------- Added 1377442709 at 1377442709 ---------------

Thanks Paul