This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = "hi" | |
y = "brown cow" | |
print "{0}, {1}".format(x,y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cur.execute("SELECT * FROM users") #Query the database and retrieve all entries from the user table | |
rows = cur.fetchall() #Place request information in an array | |
#Iterate through the array | |
for row in rows: | |
#Check if the username and password entered match any entries in the database | |
if (row[1] == username and row[2] == password): | |
#If they do we want to set the objects variables to the accounts information | |
self.userid = row[0] #Set id |