This example illustrates to describe about null value of execution of sql query in php.
In this example we select data from database table which is not null. We have seen SQL SELECT command along with WHERE clause to fetch data from MySQL table. But when we try to give a condition which compare field or column value to NULL it does not work properly.
To handle this type of problem MySQL provides three operators:
IS NULL: operator returns true of column value is NULL.
IS NOT NULL: operator returns true of column value is not NULL.
<=> operator compare values, which (unlike the = operator) is true even for two NULL values
Source Code of sql_null.php
Posted on: December 10, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles