Auto Date in table

I have a mysql table, with a field called DATE, how do i get it to
automatilly put the date on it every time a new recored it put on the
table

Date and time would be good,


Tahnks
S.Dickson [ Di, 09 Januar 2007 10:55 ] [ ID #1589598 ]

Re: Auto Date in table

S.Dickson [at] shos.co.uk wrote:

> I have a mysql table, with a field called DATE, how do i get it to
> automatilly put the date on it every time a new recored it put on the
> table
>
> Date and time would be good,
>
>
> Tahnks

Have a read through the user comments posted at

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functio ns.html
zac.carey [ Di, 09 Januar 2007 13:57 ] [ ID #1589599 ]

Re: Auto Date in table

S.Dickson [at] shos.co.uk wrote:
> I have a mysql table, with a field called DATE, how do i get it to
> automatilly put the date on it every time a new recored it put on the
> table

You can do this automatically with the TIMESTAMP datatype, but not with
the DATE datatype.

Read the documentation about TIMESTAMP:
http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html

Regards,
Bill K.
Bill Karwin [ Di, 09 Januar 2007 18:26 ] [ ID #1589600 ]
Datenbanken » mailing.database.mysql » Auto Date in table

Vorheriges Thema: Can't limit /var/log/mysql logging
Nächstes Thema: FULLTEXT inconsistency