I'll start to say that I am new to Python, so maybe this is a wierd problem,
I got a db with 3 row, I want to loop them in an dictionary, but i only get one row shown on the site, so it's some kind af overwriting every time it loops.
from dbConnect import connect
c, conn = connect()
ranks = c.execute("SELECT * FROM ranks ORDER BY rankid ASC;")
ranks = c.fetchall()
def ranksddl():
rank_dict = {}
for rank in ranks:
rank_dict[rank] = rank[2]
return rank_dict