title: SQL Update in Yii
body: <p>Given the following UPDATE query in my controller</p>
  
  <pre><code>$connection = yii::app()-&gt;db;
  $sql = "UPDATE list SET Status = 'R' WHERE ".$_POST['ListId']."=".$_POST['RListId'];
  $command=$connection-&gt;createCommand($sql);
  $command-&gt;execute();
  </code></pre>
  
  <p>This is changing every record to <code>Status = 'R'</code> not just the one with the matching parameters. <code>$_POST['ListId']</code> and <code>$_POST['RListId']</code> are exactly what I need and I have verified them though var_dump in the controller.</p>
  
  <p>What is wrong with my query? </p>