I'm using PHPMyAdmin and I've got a MySQL table column called "timestamp." The type (surprise!) is TIMESTAMP
, and in 'attributes' I've set it to ON UPDATE CURRENT_TIMESTAMP
.
However, each new record gets a timestamp that looks like this:
0000-00-00 00:00:00
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.
The relevant PHP records page hits with this query:
$query = "INSERT INTO `pagehit` (user_id, pageurl)
VALUES ('" . $userid . "', '" . $pageurl . "')";
The whole thing is running under XAMPP.
What am I missing?