Layered order in Yii

This is my CActiveDataProvider

$dataProvider = new CActiveDataProvider ('MyTable', array ( 'pagination' => array ( 'PageSize' => 4, ), 'criteria' => array ( 'condition' => 'from_user_id='.$user->id, 'order' => 'date DESC', ), )); 

My question is: I would like this CActiveDataProvider to order first by date (as the laid-out code did), and on the second level, within those who have the same date, the order per second criteria. Is it possible?

+4
source share
1 answer

Maybe I do not understand you correctly, but will there be a next job ?:

'order' => 'date DESC, name DESC',

+8
source

All Articles