Re: MySQL Increment/Decrement

From: Date: Tue, 29 Dec 2009 03:51:47 +0000
Subject: Re: MySQL Increment/Decrement
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-300720@lists.php.net to get a copy of this message
UPDATE SQLTABLE SET count = (count+1) WHERE PromoID=1 Is this valid for your issue? I have no way of testing or toying On Mon, Dec 28, 2009 at 8:54 PM, Ben Miller <ben@tottd.com> wrote: > I hope this isn't a bone-head question - Is there a MySQL query that will > increment/decrement the value in an integer column with a single query - in > other words, I don't have to run a SELECT query to get the value, > add/subtract to/from the value, and then run an UPDATE query to store the > new value? > > > > Thanks in advance. > > > > Ben > >

« previous php.general (#300720) next »