Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (Gizmo, mmkk), 55 guests, and 385 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
isaac
isaac
California
Posts: 1,004
Joined: April 2004
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 12
M4TT 9
Ruben 8
mmkk 4
FREAK 3
isaac 3
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
Delete all PMs with 'Welcome' Subject #171341
12/28/06 01:56 AM
12/28/06 01:56 AM
Joined: Jun 2006
Posts: 266
Taiwan
smallufo Offline OP
enthusiast
smallufo  Offline OP
enthusiast
Joined: Jun 2006
Posts: 266
Taiwan
After I upgrade from UBBT6 to UBBT7 , My (administrator) PM box is full of 'Welcome' message which are automatically sent to users.
This cause my PM's box has 2200+ pages (20 message / page).

I want to delete all of these PMs with the same Subject 'Welcome' .
What SQL command should I write ?

Here is my table :
Code
| ubbt_PRIVATE_MESSAGE_POSTS   |
| ubbt_PRIVATE_MESSAGE_TOPICS  |
| ubbt_PRIVATE_MESSAGE_USERS   |


Code
mysql> select count(*) from ubbt_PRIVATE_MESSAGE_TOPICS where TOPIC_SUBJECT = 'Welcome';

+----------+
| count(*) |
+----------+
|    31330 |
+----------+
1 row in set (0.17 sec)




English is not my native language.
I try my best to express my thought precisely.
I hope you understand what I mean.
If any misunderstanding results from culture gaps , I apologize first.
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Delete all PMs with 'Welcome' Subject [Re: smallufo] #171342
12/28/06 02:50 AM
12/28/06 02:50 AM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
as the pm users table contains only topic id's it's impossible to cleanly purge everything with sql commands; however I have built a php script (free, cas I'm nice like that) which is capable of doing just this. You can get it at UBBDev here.


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #171343
12/28/06 03:10 AM
12/28/06 03:10 AM
Joined: Jun 2006
Posts: 266
Taiwan
smallufo Offline OP
enthusiast
smallufo  Offline OP
enthusiast
Joined: Jun 2006
Posts: 266
Taiwan
Thank you .
It helps me a lot , cleaning thousands of welcome messages ... smile



English is not my native language.
I try my best to express my thought precisely.
I hope you understand what I mean.
If any misunderstanding results from culture gaps , I apologize first.
Re: Delete all PMs with 'Welcome' Subject [Re: smallufo] #171344
12/28/06 04:03 AM
12/28/06 04:03 AM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Not a problem; a lot of people had the same issues, figured something had to be done wink...

One thing I'm thinking about is cleaning up non-existant pm's which are shown in the users table; as some people just purged the other two and left that one unaffected (granted, I provided the query to do it, so I feel semi responsible). But I haven't done much work on that one yet (though as I have the issue on my main forum, it will eventually be done); this one was just for the community to assist all imported users (as I'm sure other products will have similar issues as well , should they have welcome messages)


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #171383
12/28/06 02:32 PM
12/28/06 02:32 PM
Joined: Nov 2006
Posts: 3,390
ntdoc Offline
Carpal Tunnel
ntdoc  Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,390
Well I don't see why a "correct" SQL statement(s) can't correctly do it. I don't see where PHP adds anything to the mix that can't be done manually.

Can you please explain in more detail why not (if this is too off-topic you can PM or e-mail me)

Thanks.

Re: Delete all PMs with 'Welcome' Subject [Re: ntdoc] #171395
12/28/06 06:04 PM
12/28/06 06:04 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Simple, the PM_Users table only has a number to identify which pm's are which pm's; there is no content to identify which is a "welcome". You could take the id from the other tables, but if you're doing a broad delete with an sql statement, i highly doubt in your ability to log every private topic id to be able to purge them from the database.

The php script opens the private topic table, grabs the id, and purges that id in all 3 tables at once, then continues; all done on its own, and messages purged from all 3 tables.

Simply put, you can't search "welcome" in the _users table as all it contains is numbers.


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #171410
12/28/06 06:47 PM
12/28/06 06:47 PM
Joined: Nov 2006
Posts: 3,390
ntdoc Offline
Carpal Tunnel
ntdoc  Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,390
isn't that what a JOIN command is for

Re: Delete all PMs with 'Welcome' Subject [Re: ntdoc] #171425
12/28/06 07:30 PM
12/28/06 07:30 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Keep in mind that most people who come here don't even know what MySQL is, much less how to use it wink.


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #177418
02/04/07 02:03 AM
02/04/07 02:03 AM
Joined: Nov 2006
Posts: 9
N
Nat Offline
stranger
Nat  Offline
stranger
N
Joined: Nov 2006
Posts: 9
I actually thought the opposite. It seems like most people interested in admin'ing UBB.threads would know about MySQL.

And yea, a JOIN could certainly get this done.

Re: Delete all PMs with 'Welcome' Subject [Re: Nat] #177426
02/04/07 03:00 AM
02/04/07 03:00 AM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
you haven't met some of the larger site owners here then wink


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #177440
02/04/07 12:10 PM
02/04/07 12:10 PM
Joined: Nov 2006
Posts: 96
2
24hourcampfire Offline
journeyman
24hourcampfire  Offline
journeyman
2
Joined: Nov 2006
Posts: 96
Like me. grin

I just upgraded and found that every single PM the site has ever generated are back. Purged PMs, weren't. Everybody's mailbox is full, full, full.

Any way to delete everything before a certain date, or let's not be picky, by ANY orderly means en masse???

Rick


Rick
Re: Delete all PMs with 'Welcome' Subject [Re: 24hourcampfire] #177465
02/04/07 05:00 PM
02/04/07 05:00 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Well, theres a reason they're "back"; they never where gone...

Keep in mind that there are 2 parties in a PM, not just one. So when one person deletes, it's still there for the other user, until they delete the message as well.

There where two differant ways to go about pm importing:
A. Don't import them, gone forever.
B. Import all pm's and assign them to the users who had posted in them.

Seeing as most users use pm's, we all harassed rick till he went with B :x...

And you could purge pm's by using the datestamp and a unix epoch date...


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: 24hourcampfire] #184511
05/20/07 05:12 AM
05/20/07 05:12 AM
Joined: May 2007
Posts: 3
C
cclapper Offline
stranger
cclapper  Offline
stranger
C
Joined: May 2007
Posts: 3
hmm.. I hope Rick can fix it..


http://www.you-switch.org - Youswitch provides advice on switching utility bills.
http://www.broardband.net - broadband advice
Re: Delete all PMs with 'Welcome' Subject [Re: cclapper] #184512
05/20/07 06:13 AM
05/20/07 06:13 AM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
the only real "fix" would be to not import PM's... Theres not much of a grey area, as in there isn't really a way to check if they exist for both or one user with the import scripts.


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #184523
05/21/07 12:15 AM
05/21/07 12:15 AM
Joined: Nov 2006
Posts: 3,390
ntdoc Offline
Carpal Tunnel
ntdoc  Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,390
I'm not sure and have not looked, but don't ALL messages regardless of type or area contain a unique id ? If not perhaps it would be a good idea to implement a unique ID for all messages that way in the future it could be used for multiple purposes of tracking or other uses.

Re: Delete all PMs with 'Welcome' Subject [Re: ntdoc] #184525
05/21/07 12:42 AM
05/21/07 12:42 AM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
All messages do have a unique id; it'd be their index id in the database


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #184548
05/21/07 09:24 PM
05/21/07 09:24 PM
Joined: Nov 2006
Posts: 3,390
ntdoc Offline
Carpal Tunnel
ntdoc  Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,390
Well then perhaps I'm off base but if he's trying to keep out duplicates can't some type of query be written to ignore duplicates based on the unique id ?

Re: Delete all PMs with 'Welcome' Subject [Re: ntdoc] #184557
05/21/07 10:31 PM
05/21/07 10:31 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
just becuse it's the same content in the message doesn't mean it's the same message; a new message is created when a user signs up, it's not the same message at all, so each message would have it's own id


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #184563
05/22/07 12:03 AM
05/22/07 12:03 AM
Joined: Nov 2006
Posts: 3,390
ntdoc Offline
Carpal Tunnel
ntdoc  Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,390
True, I get ya

Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #192931
07/26/07 11:11 AM
07/26/07 11:11 AM
Joined: Oct 2006
Posts: 85
Taylor Offline
journeyman
Taylor  Offline
journeyman
Joined: Oct 2006
Posts: 85
Thank you for the script Gizmo.
I am one of the large site owners that does not have a clue about MySQL that welcomes anything that can make my look like if I did :-)

Re: Delete all PMs with 'Welcome' Subject [Re: Taylor] #192961
07/26/07 06:45 PM
07/26/07 06:45 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
You're quite welcome; you may also be interested in my ubb sitemap script over @ UBBDev if you just moved over from another product, it'll help search engines to get your new urls in their discovery database all at once


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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #215735
07/22/08 06:32 PM
07/22/08 06:32 PM
Joined: Jul 2006
Posts: 58
M
Markus_003 Offline
journeyman
Markus_003  Offline
journeyman
M
Joined: Jul 2006
Posts: 58
Originally Posted by Gizmo

Keep in mind that there are 2 parties in a PM, not just one. So when one person deletes, it's still there for the other user, until they delete the message as well.



Am I missing something? But how do you delete a PM. I know how to do it using MySQL, but having difficulty doing it through UBBthreads FORUM.

And I am talking here about deleting one post (reply) within a PRIVATE MESSAGE, not the entire PRIVATE TOPIC.

For instance, you have PERSON 1 creating TOPIC in PM and sending a PM to a PERSON 2. How PERSON 2 does delete his own message (reply) without removing himself from the topic.

There is no problem to edit your own PM post, but how do you delete it completely. Please note again, I am not talking about how to delete entire PRIVATE TOPIC.

Re: Delete all PMs with 'Welcome' Subject [Re: Markus_003] #215736
07/22/08 06:50 PM
07/22/08 06:50 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Online tapedshut
UBB.threads Developer
Gizmo  Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
AFAIK there is no way to delete a POST from a Private Topic...



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.
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!
Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #215741
07/22/08 07:19 PM
07/22/08 07:19 PM
Joined: Jun 2006
Posts: 885
Mitch P. Offline

old hand
Mitch P.  Offline

old hand
Joined: Jun 2006
Posts: 885
Somewhat related...I think there should be admin rights in private topics, allowing you to edit/delete.

https://www.ubbcentral.com/forums/ub...ator_Rights_in_Group_PMs.html#Post198860

Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #215768
07/23/08 05:47 AM
07/23/08 05:47 AM
Joined: Jul 2006
Posts: 58
M
Markus_003 Offline
journeyman
Markus_003  Offline
journeyman
M
Joined: Jul 2006
Posts: 58
Originally Posted by Gizmo
AFAIK there is no way to delete a POST from a Private Topic...



That is what I taught, however I had in one private topic two posts (original post and one reply). After a day there is only an original post. It is interesting that REPLIES COUNTERS is still displaying 1 but there is no reply. Any taught on how it might happen?

Re: Delete all PMs with 'Welcome' Subject [Re: Nat] #221093
01/14/09 11:48 AM
01/14/09 11:48 AM
Joined: Aug 2006
Posts: 727
New Mexico
Basil Offline
old hand
Basil  Offline
old hand
Joined: Aug 2006
Posts: 727
New Mexico
Originally Posted by Nat
I actually thought the opposite. It seems like most people interested in admin'ing UBB.threads would know about MySQL.

And yea, a JOIN could certainly get this done.


Some of are not experts, but are very interested in learning. Everyone starts somewhere in their knowledge of PhP/MySQL. One of the first things I did when I migrated from classic to Threads was to purchase a Php/MySQL book. I suspect there are probably a mix of folks and a wide range of expertise and experience. I always like to learn, whihc is one of the main reasons I lurk here a lot.

Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #229224
09/15/09 12:11 AM
09/15/09 12:11 AM
Joined: Sep 2009
Posts: 48
S
Stephen Offline
newbie
Stephen  Offline
newbie
S
Joined: Sep 2009
Posts: 48
HUGE help - thanks! Just dumped 10,928 messages. Aaahhh...

Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #232688
12/26/09 04:55 PM
12/26/09 04:55 PM
Joined: Dec 2009
Posts: 4
C
carol7554 Offline
stranger
carol7554  Offline
stranger
C
Joined: Dec 2009
Posts: 4
Thank you Gizmo for the script.Seeing all those messages can be overwhelming when you have no idea how to get rid of them.

Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #233825
01/15/10 01:49 PM
01/15/10 01:49 PM
Joined: Jan 2010
Posts: 10
S
shmeeko100 Offline
stranger
shmeeko100  Offline
stranger
S
Joined: Jan 2010
Posts: 10
I was curious to know about the set up of forum script &
how & what could be enabled.

I kind of now know the answer to that now - cheers folks.

Mark smile

Re: Delete all PMs with 'Welcome' Subject [Re: Gizmo] #237066
05/27/10 01:01 PM
05/27/10 01:01 PM
Joined: May 2010
Posts: 2
Phoenix, AZ
P
pilotlicense Offline
stranger
pilotlicense  Offline
stranger
P
Joined: May 2010
Posts: 2
Phoenix, AZ
My gosh, I deleted all of mine one by one. I coulda used that script, lol.


"You know, I get the feeling women are sort of hard to please." -Mark Driver
Re: Delete all PMs with 'Welcome' Subject [Re: smallufo] #241558
02/07/11 03:20 PM
02/07/11 03:20 PM
Joined: Feb 2011
Posts: 2
G
Gman67 Offline
stranger
Gman67  Offline
stranger
G
Joined: Feb 2011
Posts: 2
Had a similar problem as well. Thanks on the info!

Re: Delete all PMs with 'Welcome' Subject [Re: smallufo] #249260
05/22/12 11:12 AM
05/22/12 11:12 AM
Joined: May 2012
Posts: 2
K
kritiana99 Offline
stranger
kritiana99  Offline
stranger
K
Joined: May 2012
Posts: 2

Excellent is the only word i can give u for this wonderful post, keep it up. I will come back again to read some more interesting things on this topic

Re: Delete all PMs with 'Welcome' Subject [Re: smallufo] #254102
11/26/13 05:04 AM
11/26/13 05:04 AM
Joined: Nov 2013
Posts: 1
M
mini Offline
stranger
mini  Offline
stranger
M
Joined: Nov 2013
Posts: 1
Thank you

Re: Delete all PMs with 'Welcome' Subject [Re: smallufo] #255304
04/10/14 06:24 AM
04/10/14 06:24 AM
Joined: Apr 2014
Posts: 1
J
John Robin Offline
stranger
John Robin  Offline
stranger
J
Joined: Apr 2014
Posts: 1
All the posts above I read, all are excellent. I had a similar problem.


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar [Not a Bug]
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,544
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)