Re: Php mysql update

From: Date: Mon, 29 Dec 2008 17:20:40 +0000
Subject: Re: Php mysql update
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-285203@lists.php.net to get a copy of this message
Wouldn't it be: mysql_query("UPDATE database set Field = Field+1 WHERE Criteria='Criteria'"); Note: no '' around +1, = operator John Corry admin@buskirkgraphics.com wrote: > Okay maybe i have just forgot. > I am trying to update the database and do a +1 to a int field without pulling the data and > adding 1 to it and sticking it back in. > > Someone refresh me on this please. > I think it is something like. > $dwsl = mysql_query("UPDATE database set Field='+1' WHERE > Criteria='Criteria'"); >

« previous php.general (#285203) next »