MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / Delete

Function Delete

projects/inventory management/main.py:74–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73
74def Delete():
75 val = int(input("Enter product ID whose records are to be deleted:"))
76 query = "delete from inventory where PID={}".format(val)
77 cursor.execute(query)
78 con.commit()
79 if cursor.rowcount > 0:
80 print("Record Successfully Deleted")
81 else:
82 print("Product not found")
83
84
85def check():

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected