At 12:17 PM +0100 1/31/03, Marco Deppe wrote:
Hi,
I was already questioning my sanity, but the problem below is
reproduceable:
This is how my table looks:
mysql> describe T_ORDH;
--+--+-+++
Field |Type |Null |Key |D
Hi.
On Fri 2003-01-31 at 12:17:42 +0100, [EMAIL PROTECTED] wrote:
>
> I was already questioning my sanity, but the problem below is
> reproduceable:
>
[...]
> If I do
> mysql> update T_ORDH set STATUS=2 where PK_ID=26272;
> ERSTELL_DATUM is set to the current date. I know that a timestamp
> take
Since that is exactly how the manual describes it, it must be a feature.
If you have more than one timestamp, they will all get set on an insert,
but only the first will be changed on an update.
Marco Deppe wrote:
Hi,
I was already questioning my sanity, but the problem below is
reproduceable:
At 12:17 +0100 1/31/03, Marco Deppe wrote:
Hi,
I was already questioning my sanity,
Don't. Reading the manual is more helpful. :-)
but the problem below is
reproduceable:
This is how my table looks:
mysql> describe T_ORDH;
--+--+-+++
Marco,
> mysql> update T_ORDH set STATUS=2 where PK_ID=26272;
> ERSTELL_DATUM is set to the current date. I know that a timestamp
> takes the current time, if set it to NULL, but since I'm not touching
> it, it shouldn't change, should it?
>
> A quick workaround is
> mysql> update T_ORDH set STATU
Read the section in the manual about timestamps, this is expected behavior,
it is how it is supposed to work.
http://www.mysql.com/doc/en/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 yo
Hi,
It is a feature, the first TIMESTAMP field is automatically
updated each time you update the record. Check the manual
for details:
http://www.mysql.com/doc/en/DATETIME.html
If you want mysql to automatically set it at creation time only,
your workaround is OK.
You can also convert ERSTELL_DA
Timestamp columns update automatically.
http://www.mysql.com/doc/en/DATETIME.html
Peter
<^_^>
> -Original Message-
> From: Marco Deppe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 6:18 AM
> To: [EMAIL PROTECTED]
> Subject: TIMESTAMP field is updated unintentionally
>
>