RE: [PHP-DB] adding integer to field in query
| From: | Matt Schroebel | Date: | Wed, 13 Aug 2003 14:48:09 +0000 |
| Subject: | RE: [PHP-DB] adding integer to field in query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29864@lists.php.net to get a copy of this message | ||
Dillon, John <mailto:JDillon@cantor.co.uk> wrote on
Wednesday, August
13, 2003 10:24 AM:
> How do you add a number to a field within the query, ie
> without having to
> extract? Eg
>
> $query="UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID'";
>
> is the above "visits=(visits+1)" legal, cos it doesn't work
> at the moment?
>
It's executing right? Echo out your query statement and see what you're
asking for.