help with mysql query
#1

Hi, how to check if field `email` contains @ symbol?


Examlple: if john@hotmail.com contains @.
Reply
#2

For first, put the value of the E-mail in a String Variable and check it with STRCAT
Reply
#3

PHP код:
SELECT `emailFROM `yourtableWHERE `name` = 'John' AND INSTR(`email`, '@') <> 
Then use mysql_num_rows to check the result. If no result is returned, the email field does not contain the @ symbol.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
PHP код:
SELECT `emailFROM `yourtableWHERE `name` = 'John' AND INSTR(`email`, '@') <> 
Then use mysql_num_rows to check the result. If no result is returned, the email field does not contain the @ symbol.
thank's.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)