I built a custom function in my model and returned the raw data:
function(){ ... $connection=Yii::app()->db; $command=$connection->createCommand($sql); $rows=$command->queryAll(); return $rows; }
$ campModel = $ model-> function ..
Then I use these lines in CArrayDataProvider:
$dataProvider=new CArrayDataProvider($campModel);
Finally, I am trying to view using CGrid:
$this->widget('zii.widgets.grid.CGridView', array( 'id'=>'bo-campaigns-grid', 'dataProvider'=>$campModel,...
I guess this is due to the way CGrid swap works ... but I'm lost. Thanks for the help :)
source share