title: MySQL GROUP BY UNIX TIMESTAMP
body: <p>I'm trying to fetch a number of rows from a MySQL database and group them by the day they were posted.</p>
  
  <p>End result I would like the following..</p>
  
  <p>Monday
  -Article 1
  -Article 2
  -Article 3</p>
  
  <p>Tuesday
  -Article 1
  -Article 2</p>
  
  <p>Wednesday
  -Article 1
  -Article 2
  -Article 3
  -Article 4</p>
  
  <p>And so on, I'm not sure if this can be done in MySQL alone without PHP doing extra work.</p>
  
  <p>This is the query I have so far but doesn't seem to group by day.</p>
  
  <pre><code>SELECT 
  cms_news.news_id,
  cms_news.news_title,
  cms_news.news_date,
  cms_news.news_category,
  cms_news.news_source,
  cms_news.news_type,
  cms_news.news_content
  FROM 
  cms_news cms_news,
  GROUP BY 
  DAYOFMONTH(FROM_UNIXTIME(cms_news.news_date)) 
  ORDER BY 
  cms_news.news_date DESC
  </code></pre>
  
  <p>Thanks.</p>