Commit a28c1349 authored by Francois Mares's avatar Francois Mares
Browse files

Replace Client.py

parent 5ca4daf5
......@@ -6,14 +6,15 @@ class Client(SQL):
def __init__(self,HOST=None, DATABASE=None, PASSWORD=None, USER=None):
super().__init__(HOST, DATABASE, PASSWORD, USER)
# TO DO
def consulter_horaire_train(self,numero):
sql='''
SELECT depart, arrivee
FROM train INNER JOIN horaires
FROM horaires INNER JOIN train
ON train.numero = horaires.id_train
WHERE train.numero=%d;
''' % numero
return self.requete_sql(sql)
return self._requete_sql(sql)
# TO DO
def rechercher_trajet(self, ville_depart, ville_arrivee):
......@@ -25,7 +26,7 @@ class Client(SQL):
ON arret.gare = gare.id_gare
WHERE (gare.nom_ville='%s' OR gare.nom_ville='%s');
''' % (ville_depart,ville_arrivee)
return self.requete_sql(sql)
return self._requete_sql(sql)
......
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