Solved

Mysql check column for invalid email

Posted on 2012-04-11
2
645 Views
Last Modified: 2012-06-27
Hello,

I recently had a very nasty encounter sending newsletters, in wich one email had an invalid char ( ï ). this made the system act up and caused some spam to several ppl.

To avoid this for future mailings i was wondering if there is an easy way to make a function in mysql (phpmyadmin) to check a column if it contains an invalid email.

thnx
0
Comment
Question by:Th0R
2 Comments
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 37835656
maybe this

select * from emails where email REGEXP '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'
0
 

Author Closing Comment

by:Th0R
ID: 37973021
Thanks, that will set me on the right track for sure !
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about why website design really matters in today's demanding market.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now