Re: Adding in MySQL
| From: | David Robley | Date: | Tue, 11 Nov 2003 11:51:23 +0000 |
| Subject: | Re: Adding in MySQL | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31521@lists.php.net to get a copy of this message | ||
In article
<D90A32314B52D41191BF00508B6FE5630A0FA558@cfukexch02.ws.london.cantor.com>
, JDillon@cantor.co.uk says...
> Can I UPDATE an int record with MySql and add 1 to it? without extracting it
> into a variable first? If so, what am I looking for in the www.mysql.com
> manual. Seems it only deals with SELECT and WHERE.
>
> Thanks,
>
> John
UPDATE table SET field = field + 1 WHERE 1 (or something very like that)
should work.
BTW did you know your mailer adds a swag of blank lines before the
disclaimer?
Cheers
--
Quod subigo farinam
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?