$criteria = new CDbCriteria();
$criteria->condition('turn='.$turn->attributes['current_turn']);
$criteria->order('value');
$dataProvider=new CActiveDataProvider('Result', array( 'criteria'=>$criteria,));
But the Yii always give me error messages:
CException
CDbCriteria and its behaviors do not have a method or closure named "condition".
/var/www/event-teamrace/application/library/base/CComponent.php(266)
But I don’t know why I get this error message, I searched on stackoverflow, the documentation, and my code looks good…