Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Help addfieldtofilter
 
CBC
Member
 
Total Posts:  48
Joined:  2008-01-15
Spain
 

Hello,

I want make a filter with the condition or and i have this:

->addFieldToFilter('fechafin', array('from' => $now'null'=> 1));

If i do this, i have this:

(fechafin >= ‘2008-04-29’)

but i should have this:

(fechafin >= ‘2008-04-29’ or fechafin is null)

Help me, please.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CBC
Member
 
Total Posts:  48
Joined:  2008-01-15
Spain
 

I have the solution:

->addFieldToFilter('fechafin', array(array('from' => $now), array('null'=> 1)));

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top