Commit 23bacaab authored by Xiang Li's avatar Xiang Li

Update prog.py

parent 351bcfca
......@@ -75,15 +75,28 @@ def updateAnimal(name)
def deleteClass(nom):
sql = "DELETE FROM Classes WHERE nom='{}'".format(nom)
sql = "DELETE FROM Classes WHERE nom='{}';".format(nom)
try:
cur.execute(sql)
except pg.Error:
print("Execute Error")
print("Delete Classe Fail")
conn.rollback()
return
conn.commit()
print('delete Succes')
print("Delete Classe Succes")
def deleteEspece(nom):
sql = "DELETE FROM Especes WHERE nom='{}';".format(nom)
try:
cur.execute(sql)
except pg.Error:
print("Execute Error")
print("Delete Espece Fail")
conn.rollback()
return
conn.commit()
print("Delete Espece Succes")
def deleteClient(id)
def deletePersonnel(id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment