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
MySQL Syntax Code Error - driving me crazy
Moderator: General Moderators
-
texmansru47
- Forum Commoner
- Posts: 42
- Joined: Mon May 12, 2008 11:27 am
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: MySQL Syntax Code Error - driving me crazy
Hint, WHERE clause are not comma delimited