title: MySQL Timestamp - why all zeros?
body: <p>I'm using PHPMyAdmin and I've got a MySQL table column called "timestamp." The type (surprise!) is <code>TIMESTAMP</code>, and in 'attributes' I've set it to <code>ON UPDATE CURRENT_TIMESTAMP</code>.</p>
  
  <p>However, each new record gets a timestamp that looks like this:</p>
  
  <pre><code>0000-00-00 00:00:00
  </code></pre>
  
  <p>I have explicitly set the default value to none, but when I save and come back to look, it is set to all zeros as above.</p>
  
  <p>The relevant PHP records page hits with this query:</p>
  
  <pre><code>$query = "INSERT INTO `pagehit` (user_id, pageurl)
  VALUES ('" . $userid . "', '" . $pageurl . "')";
  </code></pre>
  
  <p>The whole thing is running under XAMPP.</p>
  
  <p>What am I missing?</p>