Simple SQL question
I am using Php and MySQL. I'm trying to do a query that searches for entires that have a NULL value in the used field.
$query = "SELECT * FROM codes WHERE used = NULL";
Several entries do have a null value, however I am not returning anything with my query. Is there a specific syntax for search for = NULL or != NULL fields?
Would it just be is NULL and not NULL? something like that?
Thanks,
Karl
Last edited by joelhop; 10-06-2006 at 01:18 PM.
|