Commit 9db9e92a authored by Evenson Jeunesse's avatar Evenson Jeunesse
Browse files

Update prog.py

parent 23bacaab
......@@ -48,6 +48,9 @@ BASIC FUCNTIONS SECTION
///////////////////////////////////////////////////////////////////////////
"""
def insertClass(nom)
def insertEspece(nom, class_id)
def insertClient(nom, prenom, dateNaissance, adresse, telephone)
......@@ -61,8 +64,23 @@ def insertPrescription(traitement_id, medicament_id, quantite)
def insertAnimal(name)
def updateClass(nom)
def updateEspece(nom, class_id)
def updateClass(nom, new_nom) :
sql = "UPDATE Classes SET nom='{}' WHERE nom='{}'".format(new_nom, nom)
if Execute(sql):
print("Classe "+nom+" has been change in "+new_nom)
return True
print("An error occurs, please try again...")
return False
def updateEspece(classe, nom, new_classe, new_nom):
sql = "UPDATE Especes SET classe='{}', nom='{}' WHERE classe='{}' AND nom='{}';".format(new_classe,new_nom, classe, nom)
print("SQL : "+sql)
if Execute(sql):
print("Espece updated successfully")
return True
print("An error occurs, please try again...")
return False
def updateClient(nom, prenom, dateNaissance, adresse, telephone)
def updatePersonnel(nom, prenom, dateNaissance, adresse, telephone, specialite, role)
def updateAnimal(nom, dernierPoids, dernierTaille, dateNaissance, espece)
......
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