Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Moving Topics and Replies toanother Forum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Webbo
Average Member

United Kingdom
982 Posts

Posted - 24 January 2016 :  12:28:21  Show Profile  Visit Webbo's Homepage  Reply with Quote
Is there a quick way of moving all the topics and replies from one forum to another ?

I want to delete a couple of forums but don't want to lose their content so it makes sense to move the topics and replies into another existing forum but doing each individually would take ages

Is there a quick way of doing it?

Thanks

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 January 2016 :  23:23:04  Show Profile  Reply with Quote
Did you consider the "merge forums" mod?
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 25 January 2016 :  02:39:49  Show Profile  Visit Webbo's Homepage  Reply with Quote
Yes I did but the warnings and 'created in a rush' swayed me away from it
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 25 January 2016 :  03:30:32  Show Profile  Visit HuwR's Homepage  Reply with Quote
You could possibly use a dbs script to do it (I'll check later but think it would be possible.

Why not simply lock the forum and leave it, not sure why you would want to delete one but keep all the posts.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 25 January 2016 :  08:33:39  Show Profile  Visit HuwR's Homepage  Reply with Quote
It should be possible using a dbs script, but I would recommend doing a backup first

The syntax would be something like

[UPDATE]
FORUM_TOPICS
FORUM_ID#NEWFORUM_ID#FORUM_ID = OLDFORUMID
[END]
[UPDATE]
FORUM_REPLY
FORUM_ID#NEWFORUM_ID#FORUM_ID = OLDFORUMID
[END]
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 25 January 2016 :  15:32:14  Show Profile  Visit Webbo's Homepage  Reply with Quote
I have a couple of old forums showing on the default.asp page which are no longer required but which I'd like to keep the topics/posts and which will fit into another forum of similar content

I'll back up and then try the above Huw .... don't go away
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 25 January 2016 :  15:41:07  Show Profile  Visit HuwR's Homepage  Reply with Quote
If you go to (Alternative MOD Setup) under admin options, you should be able to paste that code in the box and execute it (once you have inserted the correct ID's)

If you can run sql directly against your db, then you could do it that way too, the sql is pretty straight forward

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 25 January 2016 :  16:04:06  Show Profile  Visit Webbo's Homepage  Reply with Quote
Nope that didn't work Huw, just returned an error...


UPDATE FORUM_FORUM_TOPICS SET FORUM_ID = 10 WHERE FORUM_ID = 57
-2147217865 | [MySQL][ODBC 5.1 Driver][mysqld-5.1.73-log]Table 'db_name.forum_forum_topics' doesn't exist
UPDATE FORUM_FORUM_TOPICS SET FORUM_ID = 10 WHERE FORUM_ID = 5
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 25 January 2016 :  16:15:30  Show Profile  Visit Webbo's Homepage  Reply with Quote
Using the following Sql statements in MySQL Workbench did the job though..

UPDATE FORUM_TOPICS SET FORUM_ID = 10 WHERE FORUM_ID = 57
UPDATE FORUM_REPLY SET FORUM_ID = 10 WHERE FORUM_ID = 57

Many thanks
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 25 January 2016 :  17:02:46  Show Profile  Visit HuwR's Homepage  Reply with Quote
No problem, I forgot it doesn't need the FORUM_ bit of the table name

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07