Re: [PHP-DB] query to check valid emails

2001-11-28 Thread Russ Michell
Glad someone knows more than I do, or that chap would be right up a certain creek without a paddle.. Cheers Russ On Wed, 28 Nov 2001 09:44:26 - Jon Farmer <[EMAIL PROTECTED]> wrote: > No this will not do what the original poster requested > > it will be something like the following > >

Re: [PHP-DB] query to check valid emails

2001-11-28 Thread Jon Farmer
No this will not do what the original poster requested it will be something like the following select * from table where email regexp "^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$"; Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 077

Re: [PHP-DB] query to check valid emails

2001-11-28 Thread Russ Michell
select * from tbl where email like "%$email%"; This will find the string stored in the variable '$email' in the column 'email' Adjust having the '%' at the end, the beginning or both (as above) as they will find the string '$email' at end or at the beginning of the string stored in the column