Python SQLITE insert into not working
So I am trying to get a simple program to insert information into a sqlite
db.
The line that is breaking is the cur.execute
sitename = "TEST sitename2"
siteusername = "TEST siteusername2"
sitepasswd = "TEST sitepassword2"
cur.execute("INSERT INTO mytable(sitename, siteusername, sitepasswd)
VALUES(%s, %s, %s)", (sitename, siteusername, sitepasswd))
Error that I receive from Python:
sqlite3.OperationalError: near "%": syntax error
No comments:
Post a Comment