Re: Update statement?

From: Date: Mon, 30 Apr 2001 17:03:39 +0000
Subject: Re: Update statement?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50877@lists.php.net to get a copy of this message
"Kurth Bemis" <kurth@usaexpress.net> wrote: > function modify_quantity($table, $session, $itemid, $quantity) > { > $sql = "UPDATE $table SET quantity='$quantity' WHERE > session='$session' > AND itemid='$itemid'"; > mysql_query("$sql"); Add 'echo $sql;' here (no quotes) and look at the output. If the RHS of quantity= is zero, then $quantity passed to modify_quantity is zero and that's the problem. > if there is a value in the db field "quantity" then after the statement is > executed it is set to "0" I think that $quantity is the problem. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/

« previous php.general (#50877) next »