title: Column 'id' in field list is ambiguous in YII
body: <p>I am new in YII. Trying to implement the query in controller, Below is my code which has taken from controller.</p>
  
  <pre><code>public function getCommentListByUser($user_id)
  {
          $criteria = new CDbCriteria;
          $criteria-&gt;select = "username";
          $criteria-&gt;alias = "u";
              $criteria-&gt;condition = 'cmt.commented_userd_id  = '.$user_id;
              $criteria-&gt;join = 'JOIN tbl_taskcomment cmt ON  (cmt.commented_userd_id = u.id)';
              $criteria-&gt;order = 'cmt.id ASC';  
              $model = User::model()-&gt;findAll($criteria);  
              return $model;
  }
  </code></pre>
  
  <p>when i ran the page, I got the following error,</p>
  
  <p>CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in field list is ambiguous. The SQL statement executed was: SELECT id, username, email, createtime, lastvisit, superuser, status FROM <code>tbl_users</code> <code>u</code> JOIN tbl_taskcomment cmt ON (cmt.commented_userd_id = u.id) WHERE cmt.commented_userd_id = 1 ORDER BY cmt.id ASC </p>
  
  <p>Instead fetching username from USER table,it comes with all column with out alias name. I knew this issue related with alias name. What i done wrong on this syntax as well as code.</p>
  
  <p>Kindly advice</p>