Hello I have a cart and it has several items, am trying to update the inventory so that all items in the inventory are updated when a buyer checks out..so it would subtract all the hardcover, softcover and ebooks from inventory depending on the purchases..I know how to make it work when I just need to update one record the question is how do I update several rows... Here is my current sql..
UPDATE inventory INNER JOIN cart ON inventory.isbn = cart.isbn
SET inventory.num_hardcover = inventory.num_hardcover - cart.hardcover_purchased
WHERE inventory.isbn=cart.isbn