List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:May 9 2006 4:25pm
Subject:Re: inserting server time into mysql
View as plain text  
In the last episode (May 09), Alla-amin said:
> I am trying to capture my server time automatically using php and
> insert it in a mysql table.
> 
> Can the timestamp or time data type capture this information
> automatically without having me code anything else?

You can use the 'timestamp' type to automatially insert the current
date/time when inserting or updating, or you can insert now() into a
regular 'datetime' field.

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-type-overview.html
http://dev.mysql.com/doc/refman/5.0/en/datetime.html
http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html

-- 
	Dan Nelson
	dnelson@stripped
Thread
inserting server time into mysqlAlla-amin9 May
  • Re: inserting server time into mysqlDan Nelson9 May
    • Re: inserting server time into mysqlAlla-amin9 May
      • RE: inserting server time into mysqlJ.R. Bullington9 May
        • RE: inserting server time into mysqlAlla-amin9 May
RE: inserting server time into mysqlGeorge Law9 May