{
$rawData=Yii::app()->db->createCommand("select rmt_menu_id,rmt_role_menu_act from rmt_map_role_menu where rmt_role_id=".$role_id."")->queryAll();
$dataprovider = new CArrayDataProvider($rawData,array('pagination'=>false));
//print_r($dataprovider);exit;
return $dataprovider->getData();
}
$sql="select member_count,seller_count,
visitor_count from fc_product fp
group by member_count,visitor_count,seller_count
order by member_count desc";
$connection=Yii::app()->db;
$command=$connection->createCommand($sql);
$products_statistics=$command->queryAll();
$dataprovider=new CArrayDataProvider($products_statistics,
array('pagination'=>false));
//print_r($dataprovider);exit;
return $dataprovider->getData();
but then i am getting this error
Fatal error: Call to a member function getData() on a non-object in D:\wamp\www\yii\framework\zii\widgets\CBaseListView.php on line 111