Commit 2f4144af authored by Evenson Jeunesse's avatar Evenson Jeunesse

Upload New File

parent 6d0a7061
#!/usr/bin/python3
fddfs
# http://initd.org/psycopg/docs/usage.html
import psycopg2
HOST = "localhost"
USER = "me"
PASSWORD = "secret"
DATABASE = "mydb"
# Open connection
conn = psycopg2.connect("host=%s dbname=%s user=%s password=%s" % (HOST, DATABASE, USER, PASSWORD))
# Open a cursor to send SQL commands
cur = conn.cursor()
# Execute a SQL SELECT command
sql = "SELECT * FROM t"
cur.execute(sql)
# Fetch data line by line
raw = cur.fetchone()
while raw:
print (raw[0])
print (raw[1])
raw = cur.fetchone()
////////// BOUCLE PRINCIPALE /////////////////
# Close connection
conn.close()
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
BASIC FUCNTIONS SECTION
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
def insertClass(nom)
def insertEspece(nom, class_id)
def insertClient(nom, prenom, dateNaissance, adresse, telephone)
def insertPersonnel(nom, prenom, dateNaissance, adresse, telephone, specialite, role)
def insertAnimal(nom, dernierPoids, dernierTaille, dateNaissance, espece)
def insertProprietaire(client_id, animal_id)
def insertMedicament(nomMolecule, effets)
def insertAutorise(medicament_id, espece_id)
def insertTraitement(nom, debut, duree, veterinaire_id, animal_id)
def insertPrescription(traitement_id, medicament_id, quantite)
def insertAnimal(name)
def updateClass(nom)
def updateEspece(nom, class_id)
def updateClient(nom, prenom, dateNaissance, adresse, telephone)
def updatePersonnel(nom, prenom, dateNaissance, adresse, telephone, specialite, role)
def updateAnimal(nom, dernierPoids, dernierTaille, dateNaissance, espece)
def updateProprietaire(client_id, animal_id)
def updateMedicament(nomMolecule, effets)
def updateAutorise(medicament_id, espece_id)
def updateTraitement(nom, debut, duree, veterinaire_id, animal_id)
def updatePrescription(traitement_id, medicament_id, quantite)
def updateAnimal(name)
def deleteEspece(id)
def deleteClient(id)
def deletePersonnel(id)
def deleteAnimal(id)
def deleteProprietaire(id)
def deleteMedicament(id)
def deleteAutorise(id)
def deleteTraitement(nom, debut, duree, veterinaire_id, animal_id)
def deletePrescription(traitement_id, medicament_id, quantite)
def deleteAnimal(name)
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
CONTROLLER FUCNTIONS SECTION
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
def afficherStatistiques()
def modifierTables(table)
def afficherTables(table)
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