RE: [PHP] PHP and mySQL

From: Date: Tue, 14 May 2002 11:24:37 +0000
Subject: RE: [PHP] PHP and mySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97521@lists.php.net to get a copy of this message
> You are missing a " before $booktitle. > old:booktitle=$booktitle AND quantity=quantity"; > new:booktitle="$booktitle AND quantity=quantity"; So you're saying $sql = "UPDATE Book2 SET stock ='$stock-quantity' WHERE booktitle="$booktitle AND quantity=quantity"; is the correct SQL statement? Me thinks you would be mistaken. That's another painful parsing error waiting to happen. You are partially right though, quotes were missing from the statement (although the missing quotes would have no effect on PHP running the code, just the MySQL server trying to execute the query). Sincerely, Craig Vincent

« previous php.general (#97521) next »