'Can't fetch money from database

I dont know whats wrong most likely a problem in the code, i have had my teacher look ober it and he can't se the problem ether

            if row_count == 1:
                    event3, values3 = bank_win.read(timeout=100)
                    bank_win_active = True

                    sql = "SELECT username FROM user WHERE username =%s AND password = %s"
                    print(username)
                    mycursor.execute(sql, (username, pw))
                    myresult = mycursor.fetchone()

                    myid = myresult[0]

                    logg_inn_win.Hide()
                    bank_win.UnHide()
                    sql = f"SELECT  money FROM user WHERE username  ='{myid}'"     

                    print(myid)
                    mycursor.execute(sql, myid)
                    myresult = mycursor.fetchone()
                    print(myresult)        


Sources

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

Source: Stack Overflow

Solution Source