title: Custom Query with Cdbcriteria
body: <p>How can I execute this query with CDbCriteria and CActiveDataProvider?</p>
  
  <pre><code>'SELECT * FROM tbl_post where title LIKE %'.$title.'% ORDER BY title LIKE '.$title.' DESC , title LIKE '.$title.'% DESC'
  </code></pre>
  
  <p><strong>update:</strong>
  finaly I wrote this:</p>
  
  <pre><code>$criteria = new CDbCriteria;
                      $criteria-&gt;addCondition('title LIKE :title');                        
                      $criteria-&gt;params = array(':title'=&gt;'%'.$title.'%',':t1'=&gt;$title,':t2'=&gt;$title.'%');;
                      $criteria-&gt;order='title LIKE :t1 DESC , title LIKE :t2 DESC';
  </code></pre>
  
  <p>but I got 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 `tbl_post` `t` WHERE title LIKE :title
  </code></pre>