samedi 11 avril 2015

Checking for string in column of SQLite database using python

I want to check for a user input string in a database for a login system then allow the login to happen depending on results.



def check():
username = logEntry.get()
password = passEntry.get()
curs.execute("SELECT FROM logins WHERE username LIKE (?);", (username))
curs.execute("SELECT FROM logins WHERE password LIKE (?);", (password))

logButton = tk.Button(self, text="Login", command=check)
logButton.place(x=320, y=120)


Here is what I have so far but obviously I am stuck with the check. Can somebody please tell me how to go about doing such a check, I am really stuck.


Aucun commentaire:

Enregistrer un commentaire