cs_Mic92
Messages postés15Date d'inscriptionlundi 11 octobre 2004StatutMembreDernière intervention 2 septembre 2010
-
28 juil. 2010 à 16:39
cs_Mic92
Messages postés15Date d'inscriptionlundi 11 octobre 2004StatutMembreDernière intervention 2 septembre 2010
-
28 juil. 2010 à 16:48
CB = (saisieCB.get(),)
FichierFidelCard = "FIDELCARD.db"
if not os.path.isfile(FichierFidelCard):
print " FIDELCARD CREER "
db_connexion = sqlite3.connect(FichierFidelCard)
cur = db_connexion.cursor()
cur.execute("CREATE TABLE IF NOT EXISTS CLIENTS(CB,DATE,SEXE, NOM , PRENOM, ADRESSE,CP,VILLE,TEL,PORTABLE,MAIL,NAISSANCE,VISITE,MONTANT,DATE_DERNIERE_VISITE,CUMUL,POINTS,PRELEVEMENT,DATE_DERNIER_PRELEVEMENT,RESTE) ")
cur.execute("SELECT CB,DATE,SEXE, NOM , PRENOM, ADRESSE,CP,VILLE,TEL,PORTABLE,MAIL,NAISSANCE,VISITE,MONTANT,DATE_DERNIERE_VISITE,CUMUL,POINTS,PRELEVEMENT,DATE_DERNIER_PRELEVEMENT,RESTE from clients WHERE CB = ?",CB)
resultat = cur.fetchall()
Mon but est d'entrer les différent champs dans des Entry afin qu'elles soient modifiable ou non mais qu'elles soient visibles.
resultat est bien une list mais de longueur [1] et je n'arrive pas à récuperer ces données pour les inserer ds mes Entry. Comment faire?
D'autre part, je voudrais sauvegarder toutes ces "list" dans un fichier de manière à avoir un historique : Fichier txt? Dico?
En espérant avoir été clair?
Merci de votre aide.