I have a value comming from database which is a date in informix.Sometimes this value will be null or else it will be a date.I am comparing that value with todays date like the following.
if(value_from_db <= todays_date){
//display Todays greater
}
else{
//Display Todays smaller
}
What will be the output here.It will print Todays greater
or Todays smaller
My question is that if value_from_db is NULL
will it goes inside the if condition or inside the else condition.I found something in this which is described as
A date field gets NULL value. If I use a FOR EACH even less or greather than a user date this NULL field record appear. It seems to be NULL greather than all other dates and at same time lees than all other dates.
If the field which stores NULL value is an index component NULL values are sorted high.
I need to convert this into php but after analysing the correct o/p.In case of php
if(strtotime(NULL) <= time())
echo 'Todays greater';
else
echo 'Today is smaller';
This will ouput
Todays greater
I am confused.Any help is much appreciated.