mysql - Yii criteria - modify to include OR Condition -


i have following line of code simple query

if ($this->fulfilled)    $criteria->addcondition('fulfilled ' . (($this->fulfilled == 1) ? "is not null" : "is null")); 

how can modify query contains or command run query using framework rather raw sql

if ($this->fulfilled) , (fulfilled null or fulfilled = 0) 

try

 $criteriaor = new cdbcriteria();     $criteriaor->addcondition('fulfilled null', 'or');     $criteriaor->addcondition('fulfilled = 0', 'or'); 

then if($this->fulfielled) {$criteria->mergewith($criteriaor);}


Comments