RE: [PHP] mysql newbie question...
| From: | jalist | Date: | Wed, 13 Dec 2000 19:02:28 +0000 |
| Subject: | RE: [PHP] mysql newbie question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30149@lists.php.net to get a copy of this message | ||
Wonderful, thanks a lot fellas.
Steve
-----Original Message-----
From: Ignacio Vazquez-Abrams [mailto:ignacio@openservices.net]
Sent: 13 December 2000 19:04
To: jalist
Cc: php-general@lists.php.net
Subject: Re: [PHP] mysql newbie question...
On Wed, 13 Dec 2000, jalist wrote:
> I've tried to find out how to do this and drawn a blank...
> All I want to do is increment a field in a mysql table. Do I need to read
> the value in, ++ it and then write it back to the db, or can I do this as
> part of the db query, ie within the UPDATE blah SET... query?
>
> Thanks in advance.
>
> Steve
>
Yes.
UPDATE blah SET blah=blah+1, ...
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>