MySQL exercise: This application simulates an online retailer.
- Products are listed with the name, price, and ID of each product.
- The user is asked to enter the ID of the product and the quantity of the product wanted.
- If there is insufficient stock, that message is printed on the screen.
- If there is sufficient stock, the total of the order is printed.
- If the user makes a purchase, the quantity of the item in inventory is updated.
Result if one item is ordered and in stock:
Result if more than one item is ordered and in stock:
Result if more items are ordered than are in stock: