Does the order of the properties/methods of CDbCriteria matter?

On my search() method I have the following:




$criteria->addSearchCondition('concat(t.name, " ", t.lastname)', $this->fullname, true);

$criteria->condition = 't.active= 1';



And when I try to filter the grid it doesn’t work. But if I change the order like this, it works without any problem. Why?




$criteria->condition = 't.active= 1';

$criteria->addSearchCondition('concat(t.name, " ", t.lastname)', $this->fullname, true);



weird order should not be a problem

In first case you replace condition with ‘t.active= 1’. In second case you add new condition and that is why it works. addSearchCondition modifies condition

Understood. Thanks.