I am trying to input the score to a quiz into a database in which the user already has an account.
I am getting an error saying - "sqlite3.OperationalError: near "WHERE": syntax error"
conn.execute("INSERT INTO PlH WHERE username == (?) VALUES (?)",(username,score))
conn.commit()
The column names in the sql database are named 'PlH' and 'username' and the variables are 'score' and 'username' respectively
UPDATE PlH SET score = ? WHERE username = ?. Don't use==, use=in SQL. See SQLite Update.