On Fri, Nov 21, 2003 at 11:26:57PM +0200, [EMAIL PROTECTED] wrote:
> My table is:
> CREATE TABLE `some` (
>   `id` bigint(20) NOT NULL auto_increment,
>   `name` varchar(100) NOT NULL default '',
>   `start_date` timestamp(14) NOT NULL,
>   `end_date` timestamp(14) NOT NULL,
[snip]

> And follow query:
> (1) UPDATE some SET current_tour='1' WHERE id = some_id
> 
> This query always update "start_date" field with NOW() value, i.e. above query
> is treated from MySQL as:
> (2) UPDATE some SET start_date=NOW(),current_tour='1' WHERE id = some_id
> 

As documented here:

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DATETIME

"TIMESTAMP behaviour when not running in MAXDB mode

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


Use DATETIME instead of TIMESTAMP if you don't want this to happen.


Regards,

Fred.

-- 
Fred van Engen                              XB Networks B.V.
email: [EMAIL PROTECTED]                Televisieweg 2
tel: +31 36 5462400                         1322 AC  Almere
fax: +31 36 5462424                         The Netherlands

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to