title: Automatically Initialize GETDATE() when inserting into MYSQL
body: <p>~<a href="https://stackoverflow.com/questions/17700239/mysql-column-automaticly-current-time-of-insert">Similar question</a> ~<a href="http://www.w3schools.com/sql/func_curdate.asp" rel="nofollow noreferrer">w3schools perhaps helpful link</a></p>
  
  <p>~Problem: I'm inserting rows into a mysql database and I want each row to have a column where the current date(date when row was inserted) is shown.</p>
  
  <p>~Attempted solution:</p>
  
  <pre><code>CREATE TABLE $this-&gt;DB.$table
                (
                id int,
                Report_Date date DEFAULT CURRENT_DATE ON UPDATE CURRENT_DATE)//this fails.
  </code></pre>
  
  <p>Would someone also explain what ON UPDATE means? I'm nervous that when I have multiple days of data it will update all values of Report_Date and mess up my data. The solution lies somewhere in GETDATE, I think. Furthermore I do not want time, only date. Much appreciated.</p>