Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2008
Posts: 22
stranger
stranger
Joined: Jun 2008
Posts: 22
Hi there

Can anyone tell me if there is a way to find all the posts of a user which were deleted from our forum.

I need to find these posts and delete them.

Can I do a SQL query? Which tables do I use?

Thank you

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
You might be able to get some of them but not all. A couple versions back we added the POST_POSTER_NAME field to the ubbt_POSTS table and this remains intact after a user is deleted. So you can get posts made after that, but not prior.

select POST_ID from ubbt_POSTS where POST_POSTER_NAME='deleteuser'

Just change deleteduser to the username in question.

Joined: Jun 2008
Posts: 22
stranger
stranger
Joined: Jun 2008
Posts: 22
Thanks, I will try this and see what I get.

Joined: Jun 2008
Posts: 22
stranger
stranger
Joined: Jun 2008
Posts: 22
When I run a delete SQL command in the ubbt_POSTS table, will everything still be fine afterwards?

Like for example when I run this command, will all te other posts still display correctly?

delete from ubbt_POSTS where POST_POSTER_NAME='username'

Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
The answer is yes, almost certainly... but it never hurts to back up a table before you run a multiple delete query on your database. It'd be a good idea to close the forums while you do it too.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
The problem with just deleting from the ubbt_POSTS table is you may end up with empty topics. Entries in the ubbt_TOPICS table rely on an entry in the ubbt_POSTS table that match the first post in the topic. If the user you're deleting has started topics, then those topics will still display on the forum list and will be clickable, but will result in an error.

Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
Ah. In other words, the answer is no, almost certainly not. blush wink

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Originally Posted by Neil White
Ah. In other words, the answer is no, almost certainly not. blush wink

Lol. So Neil, I must ask....that avatar? Is that you?

Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
Originally Posted by Rick
So Neil, I must ask....that avatar? Is that you?
Well, yes, but there's a perfectly reasonable explanation.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
There's a good explanation for holding what appears to be a sword, what looks to be a tombstone, and possibly some odd looking green pants or tights?

Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
Well ok, fair enough, I'm not sure it's necessarily that good an explanation, so Google freakin' green elf shorts at your own peril.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
hahaha! That's funny... and weird.... but definitely funny wink

Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
And now it's my avatar. OMG - is that wrong?!

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
I figured SCA...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
They wouldn't let me in. Thanks for reminding me... :weep:

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Like I need an excuse to get drunk and run around with a sword... wink lol


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
It's a basic human need. laugh

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well maybe if you looked a bit more like this in green. laugh

[Linked Image from sca.org]

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Looks yummy...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 40
newbie
newbie
Joined: Nov 2006
Posts: 40
Y'know, I remember a distinct lack of dusky, buxom maids while I had that kit on.

Joined: Mar 2008
Posts: 326
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 326
Mmmm... lunch


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)