This line:
$UpdateQuery->bindColumn("In_Stock_Qty", "i", $QtyLeftInStock, "WA_DEFAULT");
The last argument tells it what to do when the value is blank. A numeric zero is the equivalent of blank. If you changed it from WA_DEFAULT to WA_ZERO, then I think it would have worked with the original code.