Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Delete older post
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Delete older post

 Post Reply Post Reply
Author
Flyman30 View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: France
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flyman30 Quote  Post ReplyReply Direct Link To This Post Topic: Delete older post
    Posted: 30 April 2015 at 11:28am
I have subjects which have up to several hundreds of pages, is there a script that would allow me to delete the old messages for example: older than a given date?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 April 2015 at 12:03pm
Not sure if it is what you are looking for bit there is a tool in the admin area for 'Batch Delete Forum Topics' that will delete older topics from forums.
Back to Top
Flyman30 View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: France
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flyman30 Quote  Post ReplyReply Direct Link To This Post Posted: 30 April 2015 at 12:31pm
No Bruce this tools cleared the topic who had not answers since a certain time.
I need to delete the old post in a topic whose certain date back to 2008!
I want to be able to erase by batch the oldest post (by years) by keeping the recent post without deleting the topic. 


Edited by Flyman30 - 30 April 2015 at 12:40pm
Back to Top
Flyman30 View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: France
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flyman30 Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2015 at 11:47am
No idea ?? Cry
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2015 at 9:49am
There is no toll to delete older posts from with in a topic.

The only way I can think of doing this would be to write an SQL Query to delete the older posts from the tblThread table in the database.

Once you have deleted the older posts you would also need to update the tblTopics table for the topic and update the Start_Thread_ID
Back to Top
Flyman30 View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: France
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flyman30 Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2015 at 4:46pm
I deleted the old messages with
delete FROM  dbo.tblThread where Topic_ID =469 and Thread_ID between 29604 and 40523

and then in tbltopics updated the Start_Thread_ID
Update DBO.tblTopic set Start_Thread_ID = 40524 where Topic_ID = 469

but I do not understand how to update tbltopics for the topic ??

The number of pages is remains the former and displays 114 when we look at the forum, but if you clicked on the forum there are only 21 pages!? 


Edited by Flyman30 - 05 May 2015 at 6:55pm
Back to Top
Flyman30 View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: France
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flyman30 Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2015 at 7:11pm
Everything is back in order by updating:
Update DBO.tblTopic set No_of_replies = 200 where Topic_ID = 469
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.