Timestamp issue in mysql

Timestamp issue in mysql

am 17.09.2002 13:12:58 von Prafulla Girgaonkar

Hello
Following is the description of the problem being faced.

Problem:
The first timestamp column in a table is set to current date-time value =
as soon as we update one or more columns in the table.

Example:

The guest information is stored in a table named GUEST. The schema for =
it is as below.

create table guest (guestID int, arrivalDate timestamp, departureDate =
timestamp, status char(1));

Above table is populated using following queries.

insert into guest values (1, '2002-09-30', '2002-10-14', 'Y');
insert into guest values (2, '2002-09-20', '2002-10-01', 'Y');
insert into guest values (3, '2002-09-15', '2002-09-25', 'Y');
insert into guest values (4, '2002-09-12', '2002-09-20', 'Y');


If we use following query to update the status from Y to N, then =
arrivalDate column is set to CURRENT(system) date-time value.

update guest set status =3D 'N';

Does anybody have any information on this issue?

Thanx in advance.

Prafulla

------------------------------------------------------------ ---------
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
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

re: Timestamp issue in mysql

am 17.09.2002 16:11:02 von Victoria Reznichenko

Prafulla,
Tuesday, September 17, 2002, 2:12:58 PM, you wrote:

PG> Following is the description of the problem being faced.

PG> Problem:
PG> The first timestamp column in a table is set to current date-time value as soon as we update one or more columns in the table.

It's a normal behaviour of TIMESTAMP column:
http://www.mysql.com/doc/en/DATETIME.html


--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ Victoria.Reznichenko@ensita.net
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.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
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php