title: mysql date list with count even if no data on specific date
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3538858/mysql-how-to-fill-missing-dates-in-range">MySQL how to fill missing dates in range?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to make a graph from mysqldata,</p>
  
  <pre><code>Postid | date       | text
  1      | 2012-01-01 | bla
  2      | 2012-01-01 | bla
  3      | 2012-01-02 | bla
  4      | 2012-01-02 | bla
  5      | 2012-01-04 | bla
  6      | 2012-01-04 | bla
  7      | 2012-01-05 | bla
  </code></pre>
  
  <p>Now, I'd like to get the number of posts on every day, INCLUDING dates with zero. For example, i'd like to be able to get the first week like this:</p>
  
  <pre><code>date       | count(Postid)
  2012-01-01 | 2
  2012-01-02 | 2
  2012-01-03 | 0
  2012-01-04 | 2
  2012-01-05 | 1
  2012-01-06 | 0
  2012-01-07 | 0
  </code></pre>
  
  <p>I'm looking for a generic solution, where i don't have to specify every date. Any suggestions?</p>