Help ! Search Not Work

code model :

public function search() {

    // @todo Please modify the following code to remove attributes that should not be searched.





    $criteria = new CDbCriteria;





    $criteria->compare('id', $this->id, true);


    $criteria->compare('email', $this->email, true);


    $criteria->compare('city_id', $this->city_id, true);


    $criteria->compare('secret', $this->secret, true);


    //$criteria->addSearchCondition('email','linux');


    $criteria->order = 'id DESC';





    return new CActiveDataProvider($this, array(


        'criteria' => $criteria,


        'pagination' => array(


            'pagesize' => 15,


        )


    ));


}

code controller :

/**

 * Lists all models.


 */


public function actionIndex() {


    $model = new Subscribe('search');


    $model->unsetAttributes();  // clear any default values


    if (isset($_GET['Subscribe']))


        $model->attributes = $_GET['Subscribe'];


    $this->render('admin', array(


        'model' => $model,


    ));


}

codel view :

<?php

$this->breadcrumbs = array(

'Subscribes' =&gt; array('index'),


'Manage',

);

$this->menu = array(

array('label' =&gt; 'List Subscribe', 'url' =&gt; array('index')),


array('label' =&gt; 'Create Subscribe', 'url' =&gt; array('create')),

);

Yii::app()->clientScript->registerScript(‘search’, "

$(’.search-button’).click(function(){

&#036;('.search-form').toggle();


return false;

});

$(’.search-form form’).submit(function(){

&#036;.fn.yiiGridView.update('product-grid', {


	data: &#036;(this).serialize()


});


return false;

});

");

?>

<h1 style="height: 10px;"></h1>

<?php echo CHtml::link(‘Advanced Search’, ‘#’, array(‘class’ => ‘search-button’)); ?>

<div class="search-form" style="display:none">

&lt;?php


&#036;this-&gt;renderPartial('_search', array(


    'model' =&gt; &#036;model,


));


?&gt;

<?php

                    &#036;this-&gt;widget('zii.widgets.grid.CGridView', array(


                        'id' =&gt; 'news-grid',


                        'dataProvider' =&gt; &#036;model-&gt;search(),


                        'filter' =&gt; &#036;model,


                        'columns' =&gt; array(


                            array(


                                'name' =&gt; 'id',


                                'value' =&gt; '&#036;data-&gt;id',


                                'htmlOptions' =&gt; array('style' =&gt; 'width: 40px; text-align: center;'),


                            ),


                            array(


                                'name' =&gt; 'email',


                                'value' =&gt; '&#036;data-&gt;email',


                                'htmlOptions' =&gt; array('style' =&gt; 'width: 40px; text-align: center;'),


                            ),


                            array(


                                'name' =&gt; 'secret',


                                'value' =&gt; '&#036;data-&gt;secret',


                                'htmlOptions' =&gt; array('style' =&gt; 'width: 40px; text-align: center;'),


                            ),


                            array(


                                'class' =&gt; 'CButtonColumn',


                                'htmlOptions' =&gt; array('style' =&gt; 'text-align: center; width: 55px;'),


                            ),


                        ),


                    ));


                    ?&gt;

and reviews

them I input data and enter not workiing !

Bro can help me !!

Please add the snapshot of the error.

Hello.

You write this:




$.fn.yiiGridView.update('product-grid'



¡¡¡ PRODUCT-GRID !!!

And then in your CGridView:




'id' => 'news-grid',



¡¡¡ NEWS-GRID !!!

I think they should call the same way.

Could it be so?