Possible Duplicate:
How to check if mysql returns null/empty
I have SQL command (LEFT JOIN between 2 tables) with result ‘NULL’ or ‘0’. And now I want to create PHP condition like this :
if ($rowSearch['Approved'] == NULL)
but it failed… then I tried this one
if ($rowSearch['Approved'] == 'NULL')
also failed… PHP always skip that statement. how to write PHP IF statement for this? thanks before.
If you need to distinguish between
NULL,"",False, and0, then you need to use a strict comparison===. Or you can useis_null(). The table on this page may be relevant.