CActiveDataProvider, how to rename select field

Hello,

The select statement does not rename the List_price field.

What am I doing wrong?

Thanks





$fld = 'List_price';

$dataProvider=new CActiveDataProvider('Product', array(

	'criteria'=>array(

	'select'=>$fld. ' as price, Item_description, Extended_description, imagePath, On_hand_qty, Item, Category_id, Size, onsale',

	'condition'=>$c,

	'params'=>array(':p1'=>"%$search%"),

		'order'=>$product_sort,

 	),

	'pagination'=>array(

	'pageSize'=>20,

	),

));



I guess you need additional class fields to store these renamed values:




class A extends CActiveRecord

{

    public $price;

    // etc...

}



Thanks,

that worked.