RE: [PHP] My Project

From: Date: Tue, 19 Jul 2005 17:28:27 +0000
Subject: RE: [PHP] My Project
Groups: php.general 
Request: Send a blank email to php-general+get-218986@lists.php.net to get a copy of this message
[snip] $money -= 10; saves some chars ;) [/snip] This actually requires two trips to the database, once to get $money and once to update $money. Do it in the query instead...once..... $sqlUpdate = "UPDATE myDatabase.myTable SET myMoney = (myMoney-10) WHERE myCharacter = characterName "; $doUpdate = mysql_query($sqlUpdate, $myConnection); saves lots of characters ;)

« previous php.general (#218986) next »