Re: Adding in MySQL

From: Date: Tue, 11 Nov 2003 19:33:35 +0000
Subject: Re: Adding in MySQL
Groups: php.db 
Request: Send a blank email to php-db+get-31528@lists.php.net to get a copy of this message
UPDATE fieldname SET fieldname=fieldname+1 WHERE where condition Make sure to have a WHERE condition, or you will update all the 'fieldname' entries in your table - you have been warned. PS - Didn't look very hard on mysql.com, did you ;-p PPS - Please can you stop posting 40 empty lines to the list as your signature ? Its quite irritating. Cheers - Neil At 11:47 11/11/2003 +0000, you wrote:
Message-ID: <D90A32314B52D41191BF00508B6FE5630A0FA558@cfukexch02.ws.london.cantor.com> From: "Dillon, John" <JDillon@cantor.co.uk> To: "'php-db@lists.php.net'" <php-db@lists.php.net> Date: Tue, 11 Nov 2003 11:47:28 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Subject: Adding in MySQL Can I UPDATE an int record with MySql and add 1 to it? without extracting it into a variable first? If so, what am I looking for in the www.mysql.com manual. Seems it only deals with SELECT and WHERE. Thanks, John


« previous php.db (#31528) next »