Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
Happy new eyar, everyone!

One of my forums have +1200 threads with lots of replies.

I would like to take the 1000 oldest threads, delete all replies all move them all to a new archive forum.

How do I do this without having to detele every single reply by hand?

Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Whilst the Mass Move will allow you to mass move the threads - i can't think of an easy way to remove all the replies to just leave the initial post.

It might be easier to keep all the replies, when you move the threads using the above mod.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
First you move them to the forum "newforum", then do an sql querry

DELETE FROM `w3t_Posts`
WHERE `B_Board` LIKE 'newforum'
AND `B_Parent` != 0

Make sure you know what you are doing when using DELETE in your database though!!!

Btw, why do you want to get rid of the replies?

Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
I will try these suggestions. Sounds like they will work!

I´d like to delete the replies to lower the server load.

Edit Worked great with massmove and the sql command! Thanks!

Last edited by Gregori; 01/02/2004 10:27 AM.
Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
Btw... the field that indicates the number of replies for the archive forum and its threads still holds the old info. Same with the old forum.

How to I set this to "0" for the archive forum and update it for the old forum?


Last edited by Gregori; 01/02/2004 11:19 AM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I have to throw caution here.

Be careful with direct deletes like that. If one of the replies is listed as the "last post" in a forum, and you manually delete it. The whole forum will disappear from the main index.

Use extreme caution when manually deleting stuff from the database, often other tables will need to be adjusted as well.

If you delete posts, you'll need to recalculate the thread/reply total in the boards table, and if you're deleting replies, you'll need to readjust the number of replies in each thread, to avoid the dreaded "blank page issue" which happens when those counts get off.

Usually to delete anything in threads, multiple tables will need to be updated.... which is why it's not usually wise to use a MySQL command. You can have bigger problems later.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)