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