I have three tables called "itemorders", "mycart" and "products". I am currently moving the items in mycart into itemorders table like this in my multiquery.
$query = "INSERT into itemorders
(itemID,itemName,itemSize,itemColour,itemPrice,quantity,orderID)
SELECT itemID,itemName,itemSize,itemColour,itemPrice,quantity,
LAST_INSERT_ID() FROM mycart WHERE email='".$email."' ";
How do I use the itemID,itemColour and quantity from my query and use them to update the quantity field in the products table?