1.
$data=Vehicles::model()->findAll();
$this->render('index',array('data'=>$data));
2.
$data=new CActiveDataProvider('vehicles');
$this->render('index',array('data'=>$data));
both are same? or these have any difference? & in which situation i have to use these? please help.
$data=Vehicles::model()->findAll();
$this->render('index',array('data'=>$data));
2.
$data=new CActiveDataProvider('vehicles');
$this->render('index',array('data'=>$data));
both are same? or these have any difference? & in which situation i have to use these? please help.