[PHP] Php mysql update

2008-12-29 Thread admin
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

RE: [PHP] Php mysql update

2008-12-29 Thread Gautier Di Folco
Hello, you have to do : $dwsl = mysql_query('UPDATE database SET Field=Field+1 WHERE Criteria=\'Criteria\''); From: ad...@buskirkgraphics.com To: php-general@lists.php.net Date: Mon, 29 Dec 2008 12:05:37 -0500 Subject: [PHP] Php mysql update Okay maybe i have just forgot. I am trying

Re: [PHP] Php mysql update

2008-12-29 Thread John Corry
Wouldn't it be: mysql_query(UPDATE database set Field = Field+1 WHERE Criteria='Criteria'); Note: no '' around +1, = operator John Corry ad...@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

RE: [PHP] Php mysql update

2008-12-29 Thread admin
-0500 Subject: [PHP] Php mysql update 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