title: Date is inserting as 0000-00-00 00:00:00 in mysql
body: <p>My <code>$date</code> output is in the foreach loop</p>
  
  <blockquote>
    <p>09/25/11, 02/13/11, 09/15/10, 06/11/10, 04/13/10, 04/13/10, 04/13/10,
    09/24/09, 02/19/09, 12/21/08</p>
  </blockquote>
  
  <p>My mysql query(PHP) is as follows</p>
  
  <pre><code>("INSERT INTO table_name(`field1`, `field2`,`date`) VALUES ('".$value1."','".$value2 ."','".$date."')");
  </code></pre>
  
  <p>Question:  In my database all the dates  stores as <code>0000-00-00 00:00:00</code>. But 4th date (06/11/10) is stored as <code>2006-11-10 00:00:00</code>.</p>
  
  <p>I tried with <code>date('Y-m-d H:i:s', $date);</code> but no help.</p>
  
  <p>Note: My database field is datetime type.
  Any idea?</p>