update a row without affecting timestamp-type column

2002-01-28 Thread Egor Egorov

webmaster,

Friday, January 25, 2002, 8:45:10 PM, you wrote:

w I have a question which just may very well be ridiculous.  In one table,
w we have a column of type timestamp.  In normal cases, we want any changes
w to this row to update this timestamp (hence the nature of this datatype).
w  However, there is one case where we do NOT want the timestamp to update
w if we make a change to some data in that row.

w Is there any way to temporarily avoid updating a timestamp type?  

Setting it to current value, see
http://www.mysql.com/doc/C/o/Column_types.html for more info about
column types.


w -Ian





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   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 [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




update a row without affecting timestamp-type column

2002-01-25 Thread webmaster

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?

Thanks for your time.

-Ian




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




Re: update a row without affecting timestamp-type column

2002-01-25 Thread Paul DuBois

At 13:45 -0500 1/25/02, [EMAIL PROTECTED] 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?

Sure.  Set it to its current value.

UPDATE tbl_name SET ts_col = ts_col, other_col = new_value;


Thanks for your time.

-Ian


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