Dynamically Update A Clistview With Multiple Condition


How to filter the search results as a combination of checkboxes and dropdown in Yii? I have some categories as checkboxes and budget as dropdown that is listing from database. WIth multiple checkboxes checked and selecting a value from dropdown, how can I filter out the search results… Is there any better way ?? (My requirement is like in this link. http://www.ebay.in/sch/i.html?_from=R40&_sacat=0&_nkw=pendrives&rt=nc&LH_FS=1 )

When you select the value from dropdownlist, You will get single value.

When you select the multiple checkboxes, you will get array and you have to apply [ex] "ID IN (arrayvalues)" Condition.

CDbCriteria will helpful to handle multiple condition.

Iam using javascript for updating the CListview,


Yii::app()->clientScript->registerScript('status', '





Yii::app()->clientScript->registerScript('maximum', '





Yii::app()->clientScript->registerScript('minimum', '





Yii::app()->clientScript->registerScript('category', "







but it is not working in multiple conition

here for multiple condition

// categoryFilter is class of fields


categorys = &#036;('.categoryFilter').serialize();



    {data: categorys}



hope this help… :)