title: Mysql Group Yii Active Record by Date/Time
body: <p>This code returns the lists of scheduled posts(name, datetime).</p>
  
  <pre><code>$criteria = new CDbCriteria;
  $criteria-&gt;select='name, datetime';
  $criteria-&gt;condition='datetime&gt;:datetime';
  $criteria-&gt;params=array(':datetime'=&gt;date('Y-m-d H:i:s'));
  $criteria-&gt;order='DATE_FORMAT(datetime, "%d/%m/%Y") ASC';
  $models = Posts::model()-&gt;findAll($criteria);
  </code></pre>
  
  <p>I would like to GROUP posts with same date d/m/Y and then only represent the H/i/s for each, its possible?</p>
  
  <p>Like:</p>
  
  <pre><code>Array
  (
      [2000/10/10] =&gt; Array
      (
          [1] =&gt; Array
                  (
                      [name] = Post 1
                      [time] = 12:10
                  )
          [2] =&gt; Array
                  (
                      [name] = Post 2
                      [time] = 16:20
                  )
          [3] =&gt; Array
                  (
                      [name] = Post 3
                      [time] = 20:30
                  )
      )
  
      [2000/10/11] =&gt; Array
      (
          [6] =&gt; Array
                  (
                      [name] = Post 6
                      [time] = 10:00
                  )
      )
  )
  </code></pre>