An Amazon-like storefront using MySQL. The app will take in orders from customers and deplete stock from the store's inventory.
- A database containg a products table with 10 items, is created using MySQL.
- To start the application, navigate to the Bamazon folder in terminal and type into the command line.
- The application connects the MySQL using the mysql module. The application now has access to the items in the products table.
- The table of all the items will display (see below). The table module was used to display the table in this way.
5. The user will be prompted on the item (by giving the item ID) and quantity of said item that is to be purchased. If the item is not in stock then the following message will display and the application will stop:
If the item is in stock then the application will calculate and display the total price of the user's purchase.
NOTE: If the item is in stock, the stock quantity of that item should be sutracted by the quantity the user purchased and the MySQL table UPDATED. I could not get this functionality to work.