MySQL Syntax Code Error - driving me crazy
Posted: Tue May 20, 2008 11:03 pm
I have a php form where I need to delete consumed product from Quantity on Hand in a MySQL but add the Consumed data to the table as well as the consumed date. The code I have is as follows:
$query = "UPDATE SNAInv SET `QtyOnHand` = `QtyOnHand` - '$_POST[Consumed]', `Consumed`, `ConSumDate` WHERE ProdNum = '$_POST[ProdNum]', '$_POST[Consumed]', Now()";
The old stroy is true if you stare at code too much you cannot see the problem no matter how simple.. So if someone could be my extra set of eyes and see what I cannot I would be thankful.
Texman
$query = "UPDATE SNAInv SET `QtyOnHand` = `QtyOnHand` - '$_POST[Consumed]', `Consumed`, `ConSumDate` WHERE ProdNum = '$_POST[ProdNum]', '$_POST[Consumed]', Now()";
The old stroy is true if you stare at code too much you cannot see the problem no matter how simple.. So if someone could be my extra set of eyes and see what I cannot I would be thankful.
Texman