Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. def login():
  2. mycursor = mydb.cursor()
  3. print('Enter username: ')
  4. username = input()
  5. checkUsername = mycursor.execute('SELECT username FROM users WHERE username=?', (username))
  6. if checkUsername != 0:
  7. print('Username is not exist')
  8. else:
  9. print('Logged In!')
  10.  
  11. You have an error in your SQL syntax; check the manual that corresponds
  12. to your MySQL server version for the right syntax to use near '?' at line 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement