title: How use DATE_ADD in Yii $criteria?
body: <p>Model.php</p>
  
  <pre><code>// Declare $datetime_limit
  public datetime_limit;
  </code></pre>
  
  <p>Controller.php</p>
  
  <pre><code>// datetime_limit should be the actual datetime + 5 days
  $criteria-&gt;select="DATE_ADD(NOW(), INTERVAL 5 DAY) AS datetime_limit";
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>Active record "Users" is trying to select an invalid column "DATE_ADD(NOW()". Note, the column must exist in the table or be an expression with alias.
  </code></pre>
  
  <hr>
  
  <p>Edit 1:</p>
  
  <p>I would like to filter the find w/ a condition using a relation table (Many to Many).
  So the <code>datetime_limit</code> cannot have in relational <code>events.datetime</code>.
  How can I do that?</p>
  
  <pre><code>$criteria-&gt;select=array("DATE_ADD(NOW(), INTERVAL 5 DAY) AS datetime_limit");
  $criteria-&gt;with=array('events');
  $criteria-&gt;having='datetime_limit!=`events`.`datetime`';
  $models=Users::model()-&gt;findAll($criteria);
  </code></pre>