Automatic Update of Date Type in MySQL

  OK Computer 19:26 02 Mar 2006


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 2006

Sorted, used PHP scripting to enter the date manually.

  harristweed 21:08 02 Mar 2006

The field needs to be type 'timestamp'

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

Elsewhere on IDG sites

OnePlus 5T review: Hands-on

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

iPhone X review

Comment envoyer gratuitement des gros fichiers ?