Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login(username, password):
- password = encode_password(username, password)
- select_query = "SELECT id, username, balance, message FROM clients"
- # Balance shouldn't be in the query above.
- # Actully why the fuck does the above query exist?
- cursor.execute(select_query)
- select_query = "SELECT id, username, balance, message FROM clients \
- WHERE username = '%s' \
- AND password = '%s' LIMIT 1" % (username, password)
- cursor.execute(select_query)
- user = cursor.fetchone()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement