Log in

View Full Version : Delete Guests Posts - URGENT


tommyturnage
01-06-2009, 06:43 AM
I have a forum with 23,095 posts and about 1000 are a certain users.

Well he wanted me to delete him and his posts so I decided too.

But I forgot to delete his posts first so now I have about 1000 GUEST posts on my site.

How can I get rid of all the guest posts at once?

Marco van Herwaarden
01-06-2009, 07:15 AM
Not so easy.

You will need to manually delete the posts (and threads??) using a query to delete posts with userid = 0. But deleting posts like this can leave threads useless etc. We usually do not delete all posts on request.

dismas
01-06-2009, 07:15 AM
I think this will work for a guest. It works for a regular user, so it follows logically that it would work for a guest....

Use Advanced Search.

Put in "guest" as the username, click on "show results as posts" in the lower left, hit Search.

Click on the box in the upper right of the results to choose all the posts. Use the moderation pull down menu at the bottom to delete them.

This may take some time. There may be an easier way, but I don't know it off the top of my head.

tommyturnage
01-06-2009, 02:25 PM
Not so easy.

You will need to manually delete the posts (and threads??) using a query to delete posts with userid = 0. But deleting posts like this can leave threads useless etc. We usually do not delete all posts on request.

and what query would that be?

I think this will work for a guest. It works for a regular user, so it follows logically that it would work for a guest....

Use Advanced Search.

Put in "guest" as the username, click on "show results as posts" in the lower left, hit Search.

Click on the box in the upper right of the results to choose all the posts. Use the moderation pull down menu at the bottom to delete them.

This may take some time. There may be an easier way, but I don't know it off the top of my head.

That doesnt work
Invalid User specified. If you followed a valid link, please notify the administrator

Marco van Herwaarden
01-07-2009, 10:10 AM
To just delete the posts (make backup first!!!!):
DELETE FROM post WHERE userid = 0
This will delete all posts made by guests. But please be aware that this can make threads unreadible as posts in the midle (or even first post) might get deleted.

tommyturnage
01-07-2009, 07:16 PM
Imma give it a try...

EDIT:

It worked

Thanks

Marco van Herwaarden
01-08-2009, 08:55 AM
Ofcourse. ;)

Dismounted
01-08-2009, 09:00 AM
Everything Marco touches, works. :D

Marco van Herwaarden
01-08-2009, 09:13 AM
Now watch it or i am forced to touch you.

45wheelgun
06-07-2009, 10:37 AM
I have the same problem except much worse. I have somehow doubled my message base. Each message is duplicated, one from the original poster who is a registered user, and one from the same user name listed as guest. I have 250k messages from accounts listed as "guest". I tried the above solution and it added the following code to the first message in each thread:

<span class="ev_code_WHITE">zzz</span>

It did not appear to remove any posts.

Lynne
06-07-2009, 04:27 PM
You tried what above solution? Using a delete query will not add code to a message - it is not an update query, but a delete query. If you have that code in the message, perhaps it is in your template or a modification is adding it.

45wheelgun
06-07-2009, 10:16 PM
Yup I ran the delete query. Not sure what the deal with the code was. It did not delete the 250k messages from guest, but that ok I am just reloading.

Thank you for your help.