MySQL Timestamp - why all zeros?
问题 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 ('" .