title: Update query in Yii
body: <p>I have one requirement in <code>Yii</code> where I have to update one table based on some condition. And I have to update the column with <code>new_val =  previous_value + new_val</code>. But the code is not working as expected.</p>
  
  <p>The code I tried is</p>
  
  <pre><code>$update = Yii::app()-&gt;db-&gt;createCommand()
  -&gt;update('tbl_post', array('star'=&gt;('star' + 1),'total'=&gt;('total' + $ratingAjax)),
  'id=:id',array(':id'=&gt;$post_id));
  </code></pre>
  
  <p>In normal query the query will be</p>
  
  <pre><code>UPDATE tbl_post set star= star + 1,total = total + '$ratingAjax' where id = 1
  </code></pre>
  
  <p>Anybody knows where is mistake?</p>