Automatic Update of Date Type in MySQL

  OK Computer 19:26 02 Mar 06


I have a MySQL table that includes a field with a DATE type. I want this to automatically update every time I insert data into other rows in the same record. Everything I've read says this should happen by default but my database has a value of 0000-00-00 entered every time.

Is there something wrong with my MySQL configuration? I'm running MySQL 5.0.

Sorry if this is in the wrong section by the way but I'm using PHP as my scripting language.

Thanks in advance.

  OK Computer 20:41 02 Mar 06

Sorted, used PHP scripting to enter the date manually.

  harristweed 21:08 02 Mar 06

The field needs to be type 'timestamp'

This thread is now locked and can not be replied to.

Huawei P10 review

1995-2015: How technology has changed the world in 20 years

An overview: What leading creative agencies are doing to improve diversity

New iPad, iPhone SE & Red iPhone 7 on sale now