By selecting the ID along with the email (assuming a autonumber-type ID),
you will return all records, nullifying the desired result of the distinct.

Mike

-----Original Message-----
From: Burns, John D [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 2:23 PM
To: CF-Talk
Subject: RE: db eamil cleaner


I don't have a script but the basic idea would look like this:

Select distinct email addresses and the id with it. Then delete all
records whose ID is not in that list. Then, I'd use a regex to loop over
the emails, compare them to the regex and if it's not valid, delete the
record. I hope that helps.


John Burns
Certified Advanced ColdFusion MX Developer
Wyle Laboratories, Inc. | Web Developer


-----Original Message-----
From: dave [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 3:18 PM
To: CF-Talk
Subject: Re: db eamil cleaner

really only 2 fields: id (primary) and tbl_email, pretty simple

~Dave the disruptor~
google will pay you money to getting rid of ie :)
http://explorerdestroyer.com/ http://www.killbillsbrowser.com/

----------------------------------------
From: Rick Root <[EMAIL PROTECTED]>
Sent: Thursday, February 02, 2006 3:15 PM
To: CF-Talk <[email protected]>
Subject: Re: db eamil cleaner

dave wrote:
> anyone have a good script to run through a mysql db and remove
duplicate(but leave 1) and improper emails?

That would totally depend on your database design =)

Rick







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231190
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to