RE: [PHP] Locking mysql tables with PHP

From: Date: Tue, 25 Nov 2003 13:18:01 +0000
Subject: RE: [PHP] Locking mysql tables with PHP
Groups: php.general 
Request: Send a blank email to php-general+get-170874@lists.php.net to get a copy of this message
[snip] is there a way I can get a number and increment it all in one query then? UPDATE tblFoo SET value = (value+1) WHERE conditions [/snip] OR (forgot the PHP part) $sqlUpdate = "UPDATE tblFoo SET value = (value + $variable) WHERE conditions "; if(!($dbUpdate = mysql_query($sqlUpdate, $connectionString))){ echo "MySQL Error: " . mysql_error() . "\n"; exit(); }

« previous php.general (#170874) next »