Justin French wrote: >on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > >>how to I test for a null value? >> >> >empty()? isset()? if($var == "")? if($var == "NULL")?? have a look in >the php manual for string functions, and comparison operators >
I think he maybe meant testing for null values in SQL. If this is true, there is the null keyword: "is null" and "is not null". select * from table_name where column_name is not null This selects all rows from a table where the data in column column_name is not null. Be careful with this, as it actually tests for null and not an empty string, for example. If you want to test whether a value is null once you have assigned it to a PHP variable, you can use one of Justin's suggestions. In addition, PHP has null as well. Happy hacking. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php