I am pulling records from
sales_flat_quote using collection and to make the records unique i have applied
group clause on collection. Below is the code.
$collection = Mage::getResourceModel('sales/quote_collection') ->addFieldToFilter('is_active', '1') ->addFieldToFilter('customer_email', array('notnull' => true)); $collection->getSelect()->group('customer_email');
here the problem is by using
group, latest records are getting filter instead i want the older records to get filtered. guys please provide your valuable input on these question.
lets say i am getting below records in collection and lets assume email address's column name is email
here when i do
$collection->getSelect()->group('email'); i will get filtered records as below
instead of that i want