Search don't work [solved]

This search function gives the data in two diferent ways to a CGridView.

When fromUserStb = false, all works fine, but when fromUserStb = true, the initial showed data it’s OK but when I try to search using the search fields of the CGridView nothing happens.

Can you help me?

public function search()


	// Warning: Please modify the following code to remove attributes that

	// should not be searched.

	$criteria=new CDbCriteria;









		return new CActiveDataProvider($this, array(






		$criteria->condition='fc_delete IS NULL';


		return new CActiveDataProvider($this, array(











Kind regards.

it is quite easy… when $this->fromUserStb == true you overwrite search condition…

all functions “compare” and “add*Condition” simply modify ‘condition’ attribute of criteria object. So when you overwrite it with:

$criteria->condition=‘fc_delete IS NULL’;

only this condition is applied. change it to:

$criteria->addCondition(‘fc_delete IS NULL’);

Thx redguy! It worked.