title: CDbCommand failed to execute the SQL statement.?
body: <p>I have the following update code in my controller.
  The sql query is executing correctly and I can see the updated result in backend.
  But while executing its showing error, 'CDbCommand failed to execute the SQL statement'.
  Is there any other way to write this statement. Contoller codes are as follow.</p>
  
  <pre><code>public function actionactiveuser()
   {          
  
   $user_id=$_GET['id'];
   $query = "UPDATE user SET status = '1' WHERE id = '$user_id'";
   Yii::app()-&gt;db-&gt;createCommand($query)-&gt;queryAll();
   $this-&gt;render('login');    
   }
  </code></pre>
  
  <p>It is showing error:</p>
  
  <pre><code>CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error. The SQL statement executed was: UPDATE user SET status = '1' WHERE id = '80'
  </code></pre>