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

Alienware 17 R4 2017 review

Illustrator Sylvain Tegroeg created thousands of intricate line drawings for the mobile game…

Best iPad buying guide 2017

Comment télécharger une application indisponible en France ?