Jason Joines wrote:

I'm using MySQL 4.1.7 and need to create a column to store date and time. Also, I need to be able to update the column with something like:
update machines set update3_status='y', update3_time=SOMETHING;


I don't want update3_time to be automatically changed any time another column changes. What is the correct column type to use to get update3_time to contain day and time in the form YYYYMMDDhhmmss? Is there a fuction or something to use in place of SOMETHING in the query?

the correct column type is DATETIME. http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html

the "something" you want is probably NOW()
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html#IDX1403



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to