()
| 36 | |
| 37 | |
| 38 | def Search(): |
| 39 | val = int(input("Enter the product code to search:")) |
| 40 | flag = 0 |
| 41 | cursor.execute("select * from inventory") |
| 42 | record = cursor.fetchall() |
| 43 | for i in record: |
| 44 | if i[0] == val: |
| 45 | flag = 1 |
| 46 | print("ID", " ", "Name", " ", "Cost", "", "Quantity") |
| 47 | print(i) |
| 48 | if flag == 0: |
| 49 | print("---Record not found---") |
| 50 | |
| 51 | |
| 52 | # Updating existing record on the basis of product ID |