Hi, I'd like to return the customers from Magento who where created the day before OR who where updated the day before. I tried to play with addFieldToFilter, without any success.
I also tried to manipulate Zend_Db_Select, no success.
So now I'm stuck!
Here are some of my tries :
$customer = Mage::getModel('customer/customer');
$customers = $customer
->getCollection()
->getSelect()
->where("updated_at >= ? AND updated_at <= ?",$this->getFrom(), $this->getTo())
->orWhere("e.created_at >= ? AND e.created_at <= ?", $this->getFrom(), $this->getTo());
Or
->addFieldToFilter(
array(
array('attribute'=>'updated_at', 'gteq'=>$this->getFrom()),
array('attribute'=>'created_at', 'gteq'=>$this->getFrom())
),
'',
'left'
);
Thanks