Hello,
I would really appreciate some help on this, thanks!
I have a colomn with days_left, an integer. I have to write a Perl
script to run on a cron job once a day and decrement all the fields
in that column by 1. Is there a query to do this?
Sincerely,
Gil.
--
http://planenews.com
PGP
Gil G. writes:
I have a colomn with days_left, an integer. I have to write a Perl
script to run on a cron job once a day and decrement all the fields
in that column by 1. Is there a query to do this?
I'll leave the the cron job and perl script to you, but decrementing
something is done
UPDATE mytable SET myvalue = myvalue-1 WHERE some_condition
-Original Message-
From: Gil G. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 10:23 AM
To: [EMAIL PROTECTED]
Subject: How to decrement int field?
Hello,
I would really appreciate some help on this, thanks!
I
Update table set days_left = days_left- 1 where days_left 0 [and other
conditions].
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
m] On Behalf Of Gil G.
Sent: Tuesday, November 13, 2001 11:23 AM
To: [EMAIL PROTECTED]
Subject: How to decrement int field