move all topics from one forum to another - نوشته شده در (1108 Views)
Retired Support Moderator
MarcelG
مطلب: 2625
2625
Guys, perhaps this has been asked (and answered) before, but I'm looking for a quick script to move all topics (including their replies) from one forum to another forum (within one site). In my case it's from forum ID 50 to forum ID 20.
It concerns 328 topics with 2218 replies. Does anyone have a nice script laying around for that?
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Snitz Forums Admin
ruirib
مطلب: 26364
26364
What database are you using?
I can write you one that will work with MySQL and SQL Server, except for the update counts part, but you can run that manually afterwards...
نوشته شده در
Retired Support Moderator
MarcelG
مطلب: 2625
2625
I'm using SQL (2000).
نوشته شده در
Average Member
SiSL
مطلب: 671
671
نوشته شده در
Retired Support Moderator
MarcelG
مطلب: 2625
2625
I knew it was floating around somewhere! bigsmile Thanks!
edit Move completed! Now updating the forum counts.
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Originally posted by MarcelG Now updating the forum counts.

Heh, suprised you even posted in it :P

May patience of the prophets be with you on updating counts if you have huge number of posts. Without Rui, I would not have such opportunity to update my counts or archive my posts EVER.
نوشته شده در
Retired Support Moderator
MarcelG
مطلب: 2625
2625
Updating the counts took less than 4 minutes, so that's pretty ok for nearly 40k posts.
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Originally posted by MarcelG
Updating the counts took less than 4 minutes, so that's pretty ok for nearly 40k posts.

Lucky you, over 400k here and it either times out server side or client side :p It never ends normally.
Thanks to Rui, supplied me a SQL procedure to ease up pain down to 15 seconds.
 
شما باید یک متن وارد کنید