Mysql How to filter only valid emails from database?

by barkkathulla 2014-04-07 19:13:40

Filter valid emails from mysql query itself:


select * from myprofile where `email` NOT REGEXP '^[A-Z0-9._%-]+@[A-Z0-9.-]+.[A-Z]{2,4}$'


The pre filteration of this method is very useful to get only valid users details instead of php
"filter_var($mail, FILTER_VALIDATE_EMAIL)"
1216
like
0
dislike
0
mail
flag

You must LOGIN to add comments