> 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to