please,help me all.
I find it difficult to make the search function
this my controller
public function actionDetail() {
$criteria = new CDbCriteria;
$criteria->condition = ‘pengentri =:pengentri’;
$criteria->params = array(’:pengentri’ => Yii::app()->user->id);
$dataProvider = new CActiveDataProvider(‘Data’, array(
‘criteria’ => $criteria,
‘pagination’=>array(
‘pageSize’=>100
),
));
$this->render(‘detail’, array(
‘dataProvider’ => $dataProvider
));
}
this my view
<?php $this->widget(‘zii.widgets.grid.CGridView’, array(
‘id’ => ‘Data-grid’,
‘dataProvider’ => $dataProvider,
‘columns’ => array(
‘id’, // ini nama field pada database
‘nama’, // ini nama field pada database
‘dll’, // ini nama field pada database
)
)); ?>
how to add a search function of data?
thanks you very much.