diff options
author | Luneji <61687883+Luneji@users.noreply.github.com> | 2020-05-12 11:52:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 11:52:56 +0200 |
commit | fa4f2997fd698b17d39753ff353fc97871f0b9e7 (patch) | |
tree | 9e39c39db8fa9f09ea617909fd86a4e159d42edc | |
parent | 02591880ac729ba061558d2a4a54dfaf709845e0 (diff) |
Update insertpaq.py
-rw-r--r-- | analyse/insertpaq.py | 8 |
1 files changed, 3 insertions, 5 deletions
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() |