Update statement?

From: Date: Mon, 30 Apr 2001 16:34:29 +0000
Subject: Update statement?
Groups: php.general 
Request: Send a blank email to php-general+get-50875@lists.php.net to get a copy of this message
hey i'm working on a shopping cart..but have hit a snag whit this statement.. function modify_quantity($table, $session, $itemid, $quantity) { $sql = "UPDATE $table SET quantity='$quantity' WHERE session='$session' AND itemid='$itemid'"; mysql_query("$sql"); } if there is a value in the db field "quantity" then after the statement is executed it is set to "0" here is my calling code. if ($action == "uq" || $action == "Update" ){ modify_quantity($table,$session,$itemid,$quanity); } and the requested url. http://www.harborfresh.com/retail/cart.php?itemid=21591&quantity=5&action=Update any ideas? ~kurth

« previous php.general (#50875) next »