Python Forum
Help : Inserting records into MySQL workbench
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help : Inserting records into MySQL workbench
#2
try

sql = "INSERT INTO network_table VALUES (?, ?, ?, ?)"
        ## () makes insert data a tuple
        cursor.execute(sql, (src_IP,src_domain,dst_IP,dst_domain)) <-- this is a tuple
Links to SQL tutorials http://zetcode.com/db/sqlitepythontutorial/
http://www.devshed.com/c/a/Python/Using-...in-Python/
http://www.tutorialspoint.com/sqlite/sqlite_python.htm
Reply


Messages In This Thread
RE: Help : Inserting records into MySQL workbench - by woooee - Jan-22-2019, 08:50 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020