title: Invalid Parameter Number:number of bound variables does not match number of tokens
body: <pre><code> $dataProvider=$model-&gt;search();
  
   $dataProvider-&gt;criteria-&gt;addcondition('company_code= :id')-&gt;params=array(':id' =&gt; $company);
  
   $this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'tblapptcodegrid',
  'dataProvider'=&gt;$dataProvider,
  'filter'=&gt;$model,
  </code></pre>
  
  <p>The data is displayed correctly, but when i try to search in filter; it comes with the error</p>
  
  <pre><code>CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens. The SQL statement executed was: SELECT COUNT(*) FROM `tblapptcode` `t` WHERE (appt_code LIKE :ycp0) AND (company_code= :id) (C:\wamp\www\yii\framework\db\CDbCommand.php:543)
  </code></pre>
  
  <p>Can anyone explain why?</p>