title: Yii search with criteria and add parameters
body: <p>I have one form and i want to search in my database. I create the object with all parameters but i have one problem. When write in one textfield search works fine and the query run correctly . When write two or more textfields params doesn't work and i have a fail execution of query :</p>
  
  <p>WHERE
  ((((id_reservation=:id_reservation) AND (start=:start)) AND (end=:end)) AND
  (fkCustomer.first_name=:first_name))</p>
  
  <p>params doesn't replace.</p>
  
  <pre><code>    $criteria=new CDbCriteria;
      $criteria-&gt;with =array('fkCustomer');
      if(!empty($start))
      {
          $criteria-&gt;addCondition('start=:start');
          $criteria-&gt;params=array(':start'=&gt;$start);
      }
      if(!empty($end))
      {
  
          $criteria-&gt;addCondition('end=:end');
          $criteria-&gt;params=array(':end'=&gt;$end);
      }
      if(!empty($merge-&gt;customer_name))
      {
  
          $criteria-&gt;addCondition('fkCustomer.first_name=:first_name');
          $criteria-&gt;params=array(':first_name'=&gt;$merge-&gt;customer_name);
      }
      if(!empty($merge-&gt;customer_surname))
      {
  
          $criteria-&gt;addCondition('fkCustomer.last_name=:last_name');
          $criteria-&gt;params=array(':last_name'=&gt;$merge-&gt;customer_surname);
      }
      if(!empty($merge-&gt;customer_email))
      {
  
          $criteria-&gt;addCondition('fkCustomer.email=:email');
          $criteria-&gt;params=array(':email'=&gt;$merge-&gt;customer_email);
      }
      $criteria-&gt;limit = 100;
  </code></pre>