[nycphp-talk] mysql: timestamp issue?
Matt Juszczak
matt at atopia.net
Wed Jul 2 00:36:30 EDT 2008
> I think the default is to insert the current timestamp on creation of
> new row and not change that value even if row is updated... ?
>
> I remember I had some fun with phpMyAdmin trying to figure out how they
> had this set up.
>
> -- Kristina
If I remember correctly, it will update the first timestamp record
automatically.
For instance:
CREATE TABLE test (
field1 varchar(50) NOT NULL,
field2 timestamp NOT NULL,
field3 timestamp NOT NULL
);
will update field2 on insert AND update. field3 will not be touched.
More information about the talk
mailing list