help with mysql query - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with mysql query (
/showthread.php?tid=319516)
help with mysql query -
ajwar - 19.02.2012
Hi, how to check if field `email` contains @ symbol?
Examlple: if
john@hotmail.com contains @.
Re: help with mysql query -
aRoach - 19.02.2012
For first, put the value of the E-mail in a String Variable and check it with
STRCAT
Re: help with mysql query -
Vince - 19.02.2012
PHP код:
SELECT `email` FROM `yourtable` WHERE `name` = 'John' AND INSTR(`email`, '@') <> 0
Then use mysql_num_rows to check the result. If no result is returned, the email field does not contain the @ symbol.
Re: help with mysql query -
ajwar - 19.02.2012
Quote:
Originally Posted by Vince
PHP код:
SELECT `email` FROM `yourtable` WHERE `name` = 'John' AND INSTR(`email`, '@') <> 0
Then use mysql_num_rows to check the result. If no result is returned, the email field does not contain the @ symbol.
|
thank's.