List:General Discussion« Previous MessageNext Message »
From:Myk Melez Date:January 25 2002 7:10pm
Subject:Re: update a row without affecting timestamp-type column
View as plain text  

webmaster@stripped wrote:

>Hello all,
>
>I have a question which just may very well be ridiculous.  In one table,
>we have a column of type "timestamp".  In normal cases, we want any changes
>to this row to update this timestamp (hence the nature of this datatype).
> However, there is one case where we do NOT want the timestamp to update
>if we make a change to some data in that row.
>
>Is there any way to temporarily avoid updating a timestamp type?
>
Yes.  Just set the timestamp to itself in the UPDATE statement:

UPDATE foo SET timestampfield = timestampfield, bar = 'baz' ...etc...

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

-myk


Thread
update a row without affecting timestamp-type columnwebmaster25 Jan
  • Re: update a row without affecting timestamp-type columnPaul DuBois25 Jan
  • Re: update a row without affecting timestamp-type columnMyk Melez25 Jan