At 12:31 AM -0100 2/2/01, [EMAIL PROTECTED] wrote:
>  >Description:
>There is a _severe_ problem when dealing with "timestamp" column: if I update
>a column, also other columns are affected! I enclose a sample script to
>show the problem
>
>>How-To-Repeat:
>create table a(t1 timestamp, t2 timestamp);
>insert into a values("2001-01-20","1999-03-04");
>select * from a;
>update a set t2="1998-05-06";
>select * from a;
>drop table a;
>-- The second "select" shows that column t1 changed too!

That's how the TIMESTAMP type is supposed to work.  The first TIMESTAMP
column in a table is automatically updated to the current time and date
when you update any of the other columns in the table.

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

>
>>Fix:
>I don't know. I used datetime type instead of timestamp and it 
>_seems_ working.


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
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