id | username | hash | cash
1 bill efgeil 10000
2 tim fgrgol 10000
3 jim h6ju8k 10000
why does username_list_check[y]["username"] need the "["username"]"? Isn't the username col already selected?
Could I go username_list_check[y]["id"] and get the ids? If this is possible why?I clearly only selected username col.
username_list_check = db.execute("Select username FROM users")
for y in range (len(username_list_check)):
# check if username is in database.
if username_list_check[y][username] == request.form.get("username") or username_list_check[y]["username"] == username_list_check[-1]["username"]:
return apology("password and password confirm fields do not match")