Clistview Where Clause

Hi there,

Can someone tell be how to add a ‘where clause’ to a CListView please?

I.e. show all records where ‘column_name’ is equal to ‘some_value’.

Thanks in advance!

OK, I’ve done it by adding a condition array to the CAtciveDataProvider:


'criteria'=>array(

				'condition'=>'column_name=column_value', 

			),

There also seems to be a way to do it with the search() function in the model, can someone explain how that works?

Thanks