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)
 Merging Forums - Need help tweaking
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mortioli
Average Member

United Kingdom
898 Posts

Posted - 06 September 2003 :  04:14:53  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Hiya.

I'm trying to merge some of my forums, and I have this code so far:

<!-- #include file="config.asp" -->
<%
 Dim OldForumID, NewForumID

 ' Replace the IDs with the appropriate numbers....
 OldForumID = 1
 NewForumID = 2
 set my_Conn = Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
%>



What other tables do I need to update to make sure everything is moved across?

I have Poll MOD and Events MOD installed, so would it be:

UPDATE FORUM_TOPICS
UPDATE FORUM_REPLY
UPDATE FORUM_POLLS
UPDATE FORUM_POLL_VOTES


Also, how would I make it so they all update at the same time (instead of making different files for each table)? Would it be something like this:

<!-- #include file="config.asp" -->
<%
 Dim OldForumID, NewForumID

 ' Replace the IDs with the appropriate numbers....
 OldForumID = 1
 NewForumID = 2
 set my_Conn = Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 strSQL = "UPDATE FORUM_REPLY SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 strSQL = "UPDATE FORUM_POLLS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 strSQL = "UPDATE FORUM_POLL_VOTE SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
%>



Thanks for your time

Edited by - mortioli on 07 September 2003 03:54:01

mortioli
Average Member

United Kingdom
898 Posts

Posted - 08 September 2003 :  02:46:29  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Anyone? Please?
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 08 September 2003 :  04:09:10  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
The following tables would need to be updated:

If the forum has an archive:
A_REPLY (holds archived replies)
A_TOPICS (holds archived topics)

If you have set up an allowed member list for that forum:
ALLOWED_MEMBERS

MODERATORS
REPLY
SUBSCRIPTIONS (if enabled)
TOPICS
and of course the Poll MOD tables.

The code should look somehow like:

.
.
.
strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
my_conn.execute strSQL
strSQL = "UPDATE FORUM_REPLY SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
my_conn.execute strSQL
strSQL = "UPDATE FORUM_POLLS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
my_conn.execute strSQL
strSQL = "UPDATE FORUM_POLL_VOTE SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
.
.
.

so you execute the connection string for each table.

Hope that helps.

Oh, another note, after you've completed the "merging", don't forget to update forum counts in admin options.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 08 September 2003 04:10:52
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 September 2003 :  02:42:56  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Thanks mate

When I try and run 'update forum counts' it always times out, and hangs the forum for about 15 mins Anyway of getting round this...apart from downloading the database and running the update on my PC ?
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 September 2003 :  02:51:08  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Just to clarify...would this be correct:

<!-- #include file="config.asp" -->
<%
 Dim OldForumID, NewForumID

 ' Replace the IDs with the appropriate numbers....
 OldForumID = 1
 NewForumID = 2
 set my_Conn = Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_REPLY SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_POLLS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_POLL_VOTE SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_A_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_A_REPLY SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_ALLOWED_MEMBERS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_MODERATOR SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
 strSQL = "UPDATE FORUM_SUBSCRIPTIONS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
%>



Thanks again
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07