From f2b9c1cf2578de3011fb7cfe282aa32c765bf24a Mon Sep 17 00:00:00 2001 From: cartoonnerie Date: Mon, 5 Mar 2018 10:18:48 +0100 Subject: [PATCH] =?UTF-8?q?debug=20changement=20du=20paam=C3=A8tre=20acteu?= =?UTF-8?q?rs=20correction=20chgt=20acteurs=20bdd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baseFilms.db | Bin 40960 -> 40960 bytes cineclubBlogSQ.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/baseFilms.db b/baseFilms.db index d47a9bf8bf153dc75ab3d195c72370cc59fa891e..f7ee4caee0d1f20d7c7467d1a26be3038af4f6fd 100644 GIT binary patch delta 318 zcmZoTz|?SnX@WFk>_i!7#@LMs^X)midATPu*m3@5oXp{1Fxk#Qc5UJ5WT~)DdK#OMX#VVvb-V8&F8qG$OGqGqngPn3I^d*~Iq}6H@`p zWR3vC$@T%#lM@0|c=$8;6Zk6lnfQM36>L@%c*8rnA&!;1o1vSXnTd&^gP{Y+uMlEj h0CT$-y1;ZNL+50!_z;+IJ3~8IxQ(H0b3yzB2LRHQQl$U@ delta 281 zcmZoTz|?SnX@WFk^h6nF#^{X+^X)lXc^McO?6`y(CUZC#u<^?Ca`XI}Y~diwx`%re z_vFbT4k{ZP`#CoYdo?iHh!(RjFzT8GmsTa_<)tb(=Nw*{o0?Z5Py`fKHgg1tx#Sm> zCFTeg0!38KA`;6oQ;UFNIf;3j&wFb#TJa|VB@|7A@>3K-5-W4^i-Zz^0_vtNiA9-- z3Lc3$1x1;8!U;ezO;g{*qHG1XqSWM!)RL0a%_hE=n3x)X&I~YQ&EiktkDF`}Aj8Jb z!uOBw$K;RzmCcF*e|RSs#Ia6pjVl&nWoBe7E(VcBMIf@Ua57hX2v|5N2_%r12qF^_ KHW$QCZ~y>}>Q12m diff --git a/cineclubBlogSQ.py b/cineclubBlogSQ.py index 075c4fc..bdb6327 100644 --- a/cineclubBlogSQ.py +++ b/cineclubBlogSQ.py @@ -55,9 +55,9 @@ class filmSQ(): c = conn.cursor() if nom_attr == 'acteurs': - c.execute('DELETE FROM acteurs WHERE idFilm =?', (self.i)) - acteursToSq = [{'idFilm' : self.i, 'acteur' : a} for a in val_attr] - c.executemany('INSERT INTO acteurs VALUES (NULL, :idFilm, :acteur)', acteursToSq) + c.execute("""DELETE FROM acteurs WHERE iFilm =?""", (self.i,)) + acteursToSq = [{'iFilm' : self.i, 'acteur' : a} for a in val_attr] + c.executemany('INSERT INTO acteurs VALUES (NULL, :iFilm, :acteur)', acteursToSq) else: c.execute('UPDATE films SET %s = ? WHERE idN = ?' % nom_attr, (val_attr, self.idN)) conn.commit()