On Tue, 2002-12-17 at 15:21, Michael Fox wrote:
> Afternoon,
> 
> I've been trying (keyword trying) to attempt to use a field in mysql to record 
> the time at which a record is created in a table.
> 


The TIMESTAMP column type provides a type that you can use to
automatically mark INSERT or UPDATE operations with the current date and
time. If you have multiple TIMESTAMP columns, only the first one is
updated automatically.

Automatic updating of the first TIMESTAMP column occurs under any of the
following conditions:

      * The column is not specified explicitly in an INSERT or LOAD DATA
        INFILE statement.
      * The column is not specified explicitly in an UPDATE statement
        and some other column changes value. (Note that an UPDATE that
        sets a column to the value it already has will not cause the
        TIMESTAMP column to be updated, because if you set a column to
        its current value, MySQL ignores the update for efficiency.)
      * You explicitly set the TIMESTAMP column to NULL.


http://www.mysql.com/doc/en/DATETIME.html

Hopefully this should help in your quest.

Greeno

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to