HI All,
Just a little confused with the statement below which I am using for search
if(!empty($this->to_date) && !empty($this->from_date))
{
$criteria->condition = "t.created_date >= '$this->from_date' and t.created_date <= '$this->to_date'";
}else if(!empty($this->from_date) && empty($this->to_date))
{
$criteria->condition = "t.created_date >= '$this->from_date'";
}else if(!empty($this->to_date) && empty($this->from_date))
{
$criteria->condition = "t.created_date <= '$this->to_date'";
}
Should this also return result for today’s date if any entries are present in the database. But it is equivalent to using < and > ( not =< and >= ). Because I need to select 2014-02-11 even in order to display search result for 2014-02-10. Not quiet sure. Let me know if you can help.
Thanks.