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)
 Mass move
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

mortioli
Average Member

United Kingdom
898 Posts

Posted - 22 July 2003 :  12:49:15  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Sorry if this has been asked before, but is there anyway to mass move a number of topics? I want to merge two forums together...but it's a bit long winded when you have to edit and move each individual topic

Cheers!

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 22 July 2003 :  12:52:39  Show Profile
you could just write a simple page to do that. hard code in the forum numbers in an update statement. If the forums are in the same category, you would have to worry about changing the category number. Then you would do the same for the replies.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 22 July 2003 :  16:45:38  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Any ideas on the code I'd use?

Thanks
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 22 July 2003 :  17:16:20  Show Profile
something along the lines of

UPDATE FORUM_TOPICS SET FORUM_ID = X WHERE FORUM_ID = Y

and

UPDATE FORUM_REPLIES SET FORUM_ID = X WHERE FORUM_ID = Y

where Y is the old forum id and X is the new forum id ... this would only be if the category is the same for the old and new forum.

Let someone comfirm this though before you try it. That's just off the top of my head.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 24 July 2003 :  02:26:29  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Thanks, I'll just wait for a confirmation before going ahead with the code

Edited by - mortioli on 24 July 2003 14:14:43
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 25 July 2003 :  13:34:30  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Would anyone be able to confirm this please
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 27 July 2003 :  12:10:48  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Sorry to keep bumping this, but I'm really trying to sort out my forums, so I need an easy way to merge forums together...

Could anyone please help me?

Thanks!
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 29 July 2003 :  13:24:41  Show Profile
Looks good to me. Obviously if you're moving categories you'd need a similar SQL statement for CAT_ID. Oh, and don't forget to do thesame for the archive tables.

Wasn't there a merge forums mod for a previous version? If someone has a copy, I'll take a look at updating it for 3.4.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 29 July 2003 :  17:23:31  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
I made a file like this...

quote:

<%
UPDATE FORUM_TOPICS SET FORUM_ID = X WHERE FORUM_ID = Y
%>



...and replaced the X and Y with the correct forums, but no luck

Am I doing something wrong?
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 29 July 2003 :  18:19:19  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
You would need something like this

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

 ' Replace the IDs with the appropriate numbers....
 OldForumID = 1
 NewForumID = 2
 strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
 my_conn.execute strSQL
%>

Dave Maxwell
Barbershop Harmony Freak

Edited by - davemaxwell on 29 July 2003 18:20:14
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 30 July 2003 :  04:19:50  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
It gives me this error

quote:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/forum/mass_move.asp, line 9




I tried adding " ...

strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID "


and...

strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID ""


...but still errors

Edited by - mortioli on 30 July 2003 04:24:54
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 30 July 2003 :  05:15:42  Show Profile
Do a response.write of the SQL string. I.E:

strSQL = "UPDATE FORUM_TOPICS SET FORUM_ID = " & NewForumID & " WHERE FORUM_ID = " & OldForumID
Response.Write strSQL
my_conn.execute strSQL

Again, don't forget to run the same code on the reply and archive tables.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 30 July 2003 :  06:13:37  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Still says the same thing
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 30 July 2003 :  06:38:36  Show Profile
But it should have written the SQL statement to screen before the error message. Post the output here 'til we see if there's any errors in it.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 30 July 2003 :  07:44:52  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
Change that line to:
Response.Write strSQL : Response.End


That will give you the info and not try and execute the SQL statement.

Dave Maxwell
Barbershop Harmony Freak
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 30 July 2003 :  08:26:15  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
quote:
Originally posted by davemaxwell

Change that line to:
Response.Write strSQL : Response.End


That will give you the info and not try and execute the SQL statement.



That gives me...

UPDATE FORUM_TOPICS SET FORUM_ID = 7 WHERE FORUM_ID = 32

Edited by - mortioli on 30 July 2003 08:26:51
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07