> Of course, the page lies somewhat: it says that if you omit the column in
> an insert, it should get set to now(), but the following example shows it
> doesn't - notice that "u" is omitted in the insert, but gets set to 0
> instead of now().
>
> >>    create table foo (t timestamp, u timestamp);
> >>    insert into foo(t) values('');
> >>     // inserts 0000.... in both t and u.
>

This is in the doco. Only the first TIMESTAMP column is updated
automatically.

Extracted from http://www.mysql.com/doc/D/A/DATETIME.html

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.


Regards
Al


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to