This stored procedure performs an update on the given CartID with the given ProductID and Quantity. Used on the Shopping Cart screen when the user changes the quantity of an item.
Definition:CREATE Procedure ShoppingCartUpdate ( @CartID nvarchar(50), @ProductID int, @Quantity int ) AS UPDATE ShoppingCart SET Quantity = @Quantity WHERE CartID = @CartID AND ProductID = @ProductIDDatabase Tables Used:
ShoppingCart: The ShoppingCart table keeps track of the items a user has purchased. Its primary key is the RecordID field. The CartID is a string which we use to identify the user currently logged in. There is a many to one relationship between the ShoppingCart table and the Products table. Note that if not Quantity is supplied, a default of 1 is entered.