Skip to content

Instantly share code, notes, and snippets.

View DanielHarman's full-sized avatar

Daniel Harman DanielHarman

  • Sheffield
View GitHub Profile
x = "hi"
y = "brown cow"
print "{0}, {1}".format(x,y)
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