My controller code
$criteria = new CDbCriteria();
$criteria->compare('status', $_POST['Details']['status'], false, 'AND');
$criteria->compare('gender', $_POST['Details']['gender'], false, 'AND');
$dataProvider=new CActiveDataProvider('Details', array(
'criteria'=>$criteria,
'pagination'=>array(
'pageSize'=>20,
),
));
Now I get my results properly but the thing is even get extra columns that I don’t need and all the relations that are there in Details model are executed, this is making my results show slow,
I just want certain columns to be selected from Details, and certain relations to be executed and get their columns.
How will I achieve this I am trying to use
$criteria->select('column names seperated with commas');