RE: [PHP] Adding to a MySql Database

From: Date: Tue, 24 Sep 2002 17:18:18 +0000
Subject: RE: [PHP] Adding to a MySql Database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-117449@lists.php.net to get a copy of this message
[snip] I have a field on a MySql database that is started with a 0, and I want to add 1 to this field every time a button is pressed on a form. So it should add one every time, like if there is 5 and you press it one time it would have 6. [/snip] 1. SELECT for the current value 2. add 1 to the current value 3. UPDATE the new value HTH! Jay "I ain't gonna write your code for ya' or fix your computer neither" ***************************************************** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort & Conference Center * * New Braunfels, Texas * * Contact jay.blanchard@niicommunications.com * * * * Want to present a paper or workshop? Contact now! * *****************************************************

« previous php.general (#117449) next »