I have one doubt in data provider, I have more number of fields in the db.If i retrieve the data in specific field,it fetch null values as well as exist values are shown here.I want only the exist values .Without null values i want to load the vales How to do that…Anyone know please help me.
For example C grid view data provider 5 rows have null values in db and another 5 rows have values i want load without null values…please help me…
public function actionDataProvider() {
$uid=Yii::app()->user->id;
if(isset($_GET['user_id']))
$uid=$_GET['user_id'];
$criteria = new CDbCriteria();
$criteria->condition=("user_id= $uid ");
$dataProvider=new CActiveDataProvider('UserGallery',array('criteria'=>$criteria,'pagination'=>array('pageSize'=>20)));
$this->render('product_pic',array('model' => userGallery::model()->findAll($criteria),'dataProvider'=>$dataProvider,));
}