I have a Players table with 3 columns id, name, wins I want to insert a row into this table. Here is my code:
import sqlite3
connection = sqlite3.connect("tournament.db")
cursor = connection.cursor()
name_insert = 'David'
wins = 10
cursor.execute("INSERT INTO Players(name,wins) VALUES (%s,%s)",(name_insert,wins))
connection.commit()
connection.close()
I got this error "sqlite3.OperationalError: near "%": syntax error". Could you help me? Thanks.