more game sql

This commit is contained in:
fingadumbledore 2022-11-20 17:09:59 +01:00
parent 3e4c91c64b
commit 4c4c4e1f1a
2 changed files with 8 additions and 6 deletions

View File

@ -160,6 +160,7 @@ def session(id):
l = f"SELECT eventname, eventzeit FROM planer WHERE sessionID = \'{id}\' ORDER BY eventzeit;"
asd = cur.execute(l).fetchall()
con.commit()
cur.close()
con = sqlite3.connect("party.db")
warning_log("Verbindung mit Datenbank wurde aufgenommen /seession")
@ -170,10 +171,11 @@ def session(id):
con = sqlite3.connect("party.db")
cur = con.cursor()
l = f"SELECT userID, Spielname, Spielaktivität, ZEIT FROM game WHERE sessionID = \'{id}\' ORDER BY ZEIT;"
dsa = cur.execute(l).fetchall()
game = cur.execute(l).fetchall()
con.commit()
cur.close()
return render_template("session.html", asd=asd, das=user_count, er=creator, der=uptime(), dsa=dsa)
return render_template("session.html", asd=asd, game=game, das=user_count, er=creator, der=uptime())
else:
warning_log(" called /session without being logged in")
return render_template('passwd.html')

View File

@ -82,10 +82,10 @@
<div id="statistik">
{% for post in dsa %}
<p>{{ dsa }}</p>
<hr>
{% endfor %}
{% for post in game %}
<p>{{ game }}</p>
<hr>
{% endfor %}
</div>
</div>