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?
> 
> 
> 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 public key at:
> keskydee.com/gil.asc
> ICQ: 3310801
> 
> ---------------------------------------------------------------------
> 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
> 
> 


---------------------------------------------------------------------
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

Reply via email to