I'm very new to Python and I'm facing a problem with Python-SQLite connection.
con=connection()
cur=con.cursor()
cur.execute("""UPDATE table1 SET column1=%s WHERE column2=%d""",(var1,var2))
if(cur.rowcount > 1):
cur.commit()
else:
return["Error"]
Where var1 stores a string, and var2 stores an integer.
The error is the following:
SQLError('SQLError: near "%": syntax error',)
I've read plenty of tutorials and threads in here about how to write my query with the variables and I'm in a dead end.