Previous Thread
Next Thread
Print Thread
Rate Thread
#254790 07/28/2003 10:12 PM
Joined: Feb 2003
Posts: 64
Power User
Power User
Offline
Joined: Feb 2003
Posts: 64
I have users in my database that have signed up twice, using two different usernames, but the same email address. Is there a query that I could run that would list all accounts with the same email addresses so that I could manually delete one? Thanks.

Sponsored Links
bhlaws #254791 07/28/2003 10:23 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I think it would be something like this:

select t1.U_Number,t1.U_Username,t2.U_Number,t2.U_Username,t1.U_RegEmail
from w3t_Users as t1, w3t_Users as t2
where t1.U_RegEmail = t2.U_RegEmail
and t1.U_Number != t2.U_Number



I haven't tried the query but I think it will work.

Anyone else have a better way? I'm probably behind the times or need to read more... LoL

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I was just trying to figure this out. I didn't know about the t1 and t2 stuff though. Thanks for learnin' me!

BTW - I believe your query works. I just tested it and it didn't return any errors. Of course, I don't allow duplicate emails, but I changed != to = and it returned everyone.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)