I am trying to update the quantity on cartitems table:
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + '" & CtempQty & "' WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
actually concat strings, so instead of 3+3, now it is 33
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + & CtempQty & WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
gives syntax error near & error message
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + "& CtempQty &" WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
or
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + '& CtempQty &' WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
are both not working, but:
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + 1 WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
does increment 1 to the quantity(Qty).
so how can I add the CtempQty, which is the request.form("qty"
to the quantity, which is Qty to the table? thank you very much.
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + '" & CtempQty & "' WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
actually concat strings, so instead of 3+3, now it is 33
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + & CtempQty & WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
gives syntax error near & error message
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + "& CtempQty &" WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + '& CtempQty &' WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
are both not working, but:
Set rs3 = conn.Execute("UPDATE CartItems SET Qty = Qty + 1 WHERE Cartid = '" & cartID & "' And Productid = '" & s & "' "
does increment 1 to the quantity(Qty).
so how can I add the CtempQty, which is the request.form("qty"