List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 22 2002 7:16pm
Subject:Re: unwanted timestamp update
View as plain text  
At 20:16 +0100 11/22/02, ozy wrote:
>Hello everyone,
>
>/first of all, sorry about my bad english :-)/
>
>i had just found some interesting thing with MySQL 3.23 (win2000).
>
>i have a table like this:
>+------------+---------------+------+-----+---------+-------+
>| Field      | Type          | Null | Key | Default | Extra |
>+------------+---------------+------+-----+---------+-------+
>| page       | varchar(255)  | YES  |     | NULL    |       |
>| host       | varchar(255)  | YES  |     | NULL    |       |
>| browser    | varchar(255)  | YES  |     | NULL    |       |
>| referer    | varchar(255)  | YES  |     | NULL    |       |
>| datum      | timestamp(14) | YES  |     | NULL    |       |
>| discrete   | char(1)       | YES  |     | NULL    |       |
>| counter_id | int(11)       | YES  |     | NULL    |       |
>| hely       | varchar(255)  | YES  |     | NULL    |       |
>+------------+---------------+------+-----+---------+-------+
>it is just a work table so nothing interesting.
>
>"hely" is NULL for all of the records, "datum" is different for (almost) all.
>("datum" is a hungarian word for "date").
>
>now i run an SQL query like this one:
>
>  update szurtcounter set hely='kulfold';
>
>after that the value of "hely" for all of my records is 'kulfold',
>BUT!! the value of the "datum" field is THE CURRENT SYSTEM TIME also 
>for all of my
>records!
>
>i don't get this one :-(

That's how TIMESTAMP columns work.  This is explained in the manual.

>
>thanks for any help
>
>--
>Best regards,
>  Csite Laszlo aka ozy

Thread
unwanted timestamp updateozy22 Nov
  • Re: unwanted timestamp updatePaul DuBois22 Nov
  • Re: unwanted timestamp updateJocelyn Fournier22 Nov
    • Re[2]: unwanted timestamp updateozy22 Nov
  • Re: unwanted timestamp updateStefano Locati22 Nov