I’m trying to add an extra field to my table; TIMESTAMP. I’ve tried testing this field by going back and updating/editing paticular fields to see if it indicated the date that it was editied - and for some reason it doesn’t.

What I do get, however, is an ‘illegal’ date. “00000000”. I’m quite stumped as to why this happening, and just wondered if anyone could help me on this one?



Hi Wil -

What syntax are you using? Updating a TIMESTAMP value is usually done in the following manner:

update blah set thetimevalue=NULL

Does that work?

(if not, you can probably output mysql_error() and find what the deal is, hopefully … It also helps to run the query you’re trying to use by hand and seeing what happens)

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

Hiya Jeff

When I add a new record to the table, the TIMESTAMP field is filled in correctly with the time the record was created.

However, when I go back and update a record (the updates do actually take place) the TIMESTAMP field resets itself to an illegal 000000.

I’ll try setting it to NULL when updating records and see what happens.