I need to sort a query by 2 columns. Is this possible using propel?
i tried:
$c->addAscendingOrderByColumn(self::COL1);
$c->addAscendingOrderByColumn(self::COL2);
but the second call to addAscendingOrderByColumn overrides the first one.
Regards, Radu.
I was struggling with this issue and after reading this post I have been almost gave up... but suddendly I found this solution:
$criteria->addAscendingOrderByColumn(ClassPeer::COLUMN1)->addAscendingOrderByColumn(ClassPeer::COLUMN2);
In this way the second call to addAscendingOrderByColumn will add the order to the first one.