From fa4f2997fd698b17d39753ff353fc97871f0b9e7 Mon Sep 17 00:00:00 2001 From: Luneji <61687883+Luneji@users.noreply.github.com> Date: Tue, 12 May 2020 11:52:56 +0200 Subject: Update insertpaq.py --- analyse/insertpaq.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'analyse') diff --git a/analyse/insertpaq.py b/analyse/insertpaq.py index b1dc3a5..2a3d266 100644 --- a/analyse/insertpaq.py +++ b/analyse/insertpaq.py @@ -111,13 +111,11 @@ def connexionBD(): conn=connexionBD() cur=conn.cursor() - sql="""insert into paquet(heure,protocole,ip_source,ip_destination,port_source,port_destination) values (a,b,c,e,d,f); - -insert into paquet(heure,protocole,ip_source,ip_destination,port_source,port_destination) values (z,y,x,v,w,u); -""" + sql="""insert into paquet(heure,protocole,ip_source,ip_destination,port_source,port_destination) values ({},{},{},{},{},{}); +insert into paquet(heure,protocole,ip_source,ip_destination,port_source,port_destination) values ({},{},{},{},{},{}); +""".format(a,b,c,e,d,f,z,y,x,v,w,u) cur.execute(sql) conn.commit() - data=cur.fetchall() conn.close() -- cgit v1.2.3