Solved

Mysql check column for invalid email

Posted on 2012-04-11
2
643 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Read about why website design really matters in today's demanding market.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
The viewer will learn how to count occurrences of each item in an array.

705 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

16 Experts available now in Live!

Get 1:1 Help Now