in Magento 1.9 Community, I have this query

created_at >= subdate(now(), INTERVAL 1 DAY) Group By product_id order By sum(qty_ordered) desc

How do I do this in Helper/Data.php? Currently this is my code

$products = Mage::getModel('myshop/daily') ->getCollection() ->addAttributeToFilter('parent_item_id', array('null' => true))

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.