|
Posted by matt on 06/24/05 15:54
Hey everyone. I've been doing some php/mysql programming for a while, but i
don't know if i've been doing this the correct way. if i have a table that
i would like to know if it contains 1 particular record, what is the best
way of doing it? There should not be more than one instance of it, and it
could only be in one row. Specifically, i want to know if an email address
is in the database.
I've been doing a "SELECT * FROM email WHERE address = '$address'"; and then
using mysql_num_rows() to see if there if it is greater than zero. is there
a command to see if that address exists, such as returning TRUE or FALSE.
thanks!
Navigation:
[Reply to this message]
|