Let's say you want to delete from forum 18:
[sql]
DELETE FROM post USING post,thread WHERE post.threadid = thread.threadid AND thread.forumid=18 AND post.postid != thread.firstpostid
[/sql]
This should do the trick - it will delete all posts in that forum, except the first post of each thread.
WARNING: Although this query was tested, I don't guarantee anything, so be strongly advised to backup your data first!
Furthermore you must rebuild threads afterwards, as otherwise you will see wrong figures in forumdisplay.
|