'Python Flask , not all parameters were used into SQL

This is my code, i have a form in HTML where an user can register then i try to save his registration data on mySQL DB, it says not all parameters are being used. Any solutions? The code is below

@app.route("/register", methods = ['GET', 'POST'])
def register():
    ##server = smtplib.SMTP("smtp.gmail.com",587)
    
    
    if request.method == 'POST':
        #Parse form data    
        password = request.form['password']
        email = request.form['email']
        firstName = request.form['firstName']
        lastName = request.form['lastName']
        conn = mysql.connector.connect(user='root', password='', host='localhost', database='mbvenditore')
        cursor = conn.cursor(dictionary=True)
        
        
        
        #query = ("INSERT INTO users (password, email, nome, cognome, indirizzo1, indirizzo2, cap, citta, provincia, stato, telefono) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s")
        #cursor.execute("INSERT INTO utenti (idutente,password, email, nome, cognome) VALUES (NULL,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)")
        #cursor.execute('INSERT INTO utenti VALUES (% s, % s, % s, % s)', (password, email, firstName,lastName, ))
        cursor.execute('INSERT INTO utenti VALUES (%s , % s, % s, % s)', (password, email, firstName,lastName, ))
        
    return render_template("login.html")


Solution 1:[1]

You have spaces between % and s. It seems that can be an issue. Second thing, why do you have a comma after lastname? – Daniyal Ishfaq

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ali Zahid Raja