()
| 8 | |
| 9 | |
| 10 | def ADD(): |
| 11 | pid = int(input("Enter the product id:")) |
| 12 | pname = input("Enter the product name: ") |
| 13 | pcost = int(input("Enter the product cost:")) |
| 14 | pqty = int(input("Enter the product quantity:")) |
| 15 | query = "insert into inventory values({},'{}',{},{})".format( |
| 16 | pid, pname, pcost, pqty |
| 17 | ) |
| 18 | cursor.execute(query) |
| 19 | con.commit() |
| 20 | print("Data Inserted successfully") |
| 21 | |
| 22 | |
| 23 | # Displaying record in List form |