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

How to get all Order since a particular date
 
nicolas46
Sr. Member
 
Total Posts:  210
Joined:  2008-04-09
Toulouse
 

When I do this :

$collectionCMD Mage::getResourceModel('sales/order_collection')        
                        ->
addAttributeToSelect('*')
                     ->
addAttributeToFilter(array(array('attribute' => 'created_at''datetime' => true'from' => $order_since)));
                    


                $collectionCMD
->printlogquery(true);
                 exit();
I get this sql query:
SELECT `e`.* FROM `mage_sales_order` AS `eWHERE (e.entity_type_id '11') AND ((e.created_at >= '2008-07-01 12:46:09'))

But I want this one ( “>=” ------> “>") :

SELECT `e`.* FROM `mage_sales_order` AS `eWHERE (e.entity_type_id '11') AND ((e.created_at >'2008-07-01 12:46:09'))

What I have to do please ?

[update]

I found :

$collectionCMD Mage::getResourceModel('sales/order_collection')        
                        ->
addAttributeToSelect('*')
                     ->
addAttributeToFilter(array(array('attribute' => 'created_at''datetime' => true'gt' => $order_since)));
                    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top