def loadClasses():
    # get max classes
    g.maxClasses = database.getNumberOfRows("classes")

    for i in range(0, g.maxClasses):
        query = database.sendQuery("SELECT * FROM classes WHERE id=%i;" % (i+1))
        rows = query.fetchone()

        Class[i].name = rows['name']
        Class[i].sprite = rows['sprite']
        Class[i].stat[Stats.strength] = int(rows['stat_strength'])
        Class[i].stat[Stats.defense] = int(rows['stat_defense'])
        Class[i].stat[Stats.speed] = int(rows['stat_speed'])
        Class[i].stat[Stats.magic] = int(rows['stat_magic'])
dataset/ETHPy150Open marcusmoller/pyorpg-server/src/database.py/loadClasses/original