Sep 3, 2013

Magento: How to select a collection with one field only.

Here's what one user did. I it work like a charm to me.
$colelction->getSelect()
    ->reset(Zend_Db_Select::COLUMNS) // THis is import thing
    ->columns('MAX(created) as max_created')
    ->group(array('status_id'));

As courtesy to eth original post Magento: Single field collection

No comments: