
November 24th, 2003, 07:11 PM
|
|
|
|
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152
Time spent in forums: < 1 sec
Reputation Power: 4
|
|
|
RE: Timestamp trouble
Here is what the MySQL manualsays about timestamps...
Quote:
TIMESTAMP[(M)]
A timestamp. The range is '1970-01-01 00:00:00' to sometime in the year 2037. MySQL displays TIMESTAMP values in YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, or YYMMDD format, depending on whether M is 14 (or missing), 12, 8, or 6, but allows you to assign values to TIMESTAMP columns using either strings or numbers. A TIMESTAMP column is useful for recording the date and time of an INSERT or UPDATE operation because it is automatically set to the date and time of the most recent operation if you don't give it a value yourself. You can also set it to the current date and time by assigning it a NULL value.
MySQL Reference Manual (C) 2002 MySQL AB
|
if you are inserting the current time into one of the timestamp fields and not specifying NULL for the other, then MySQL will automatically populate the other timestamp field with the current time, hence the fact that both are the same...
|