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 |
try 'is' instead of '='
|
All times are GMT -5. The time now is 06:27 PM. |