title: Automatically create entries in database table (php/mysql)
body: <p>I am working on a project which keeps a record of lets say amount of money spent in a day.
  Lets say the beginning day(first entry) in the database is 1-Jan-2013. 
  Now everyday I will submit an entry to the database but on some days I cant. The table looks like this:</p>
  
  <p>Date_<strong><em>_</em>__<em>_</em>_</strong>|<em><strong></em>__<em>_</em>__</strong>_Spent</p>
  
  <p>2013-01-09 | 2000</p>
  
  <p>2013-01-11 | 1200</p>
  
  <p>Lets suppose today is 11-jan-2012 and I forgot to make an entry on 10-jan-2012. Now I want to write the code using php+mysql, which will go through the table and check if there are any dates missing between the first entry and the latest entry. And when it finds that the entry for the day 10-jan-2012 is missing, it should create the entry itself with amount 0 in the spent column. How can I achieve this? Is there any better approach then the one I am trying to use?</p>