Forum Moderators: coopster
I have already sought assistance on this problem here..
But I'm still having problems resolving it. The code I have is
if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE live_stock SET qty=-%s WHERE part_number=%s",
GetSQLValueString($HTTP_POST_VARS['qty'], "int"),
GetSQLValueString($HTTP_POST_VARS['partnumber'], "text"));
Its working to the extent that the entered value is being deducted, but not from the original stock level.
It zeros the stock level and takes away the entered value, so I start off with 5, sell 5 and the stock total goes to -5 and not 0?
Any clues would be appreciated.
Thanks
Karl