# Timestamp in MySQL database

**URL:** <https://forum.kirupa.com/t/timestamp-in-mysql-database/204256>\
**Category:** programming\
**Created:** [October 18, 2006, 1:00pm UTC](https://forum.kirupa.com/t/timestamp-in-mysql-database/204256 "2006-10-18T13:00:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/smax/32/2916_2.png) [@Smax](https://forum.kirupa.com/u/Smax)\
**Post date:** [October 18, 2006, 1:00pm UTC](https://forum.kirupa.com/t/timestamp-in-mysql-database/204256/1 "2006-10-18T13:00:38Z")

</div>

I’m a complete MySQL newbie, so any answers to my question in small words that a child could understand would be appreciated. :thumb2:

I’ve created a table in MySQL using PHPMyAdmin which is updated from a PHP file with data from an online survey. I want to somehow insert a time and date stamp into the table for each entry.

I’m assuming this is something to do with the ON UPDATE CURRENT\_TIMESTAMP attribute, but when I try and add this to a row in the table I get an error message - #1294 - Invalid ON UPDATE clause for ‘id’ column.

What am I doing wrong, and what should I be doing?
