This commit is contained in:
2025-12-05 19:23:50 -08:00
parent 8c973d35cb
commit 584b118d62
3 changed files with 35 additions and 14 deletions

View File

@@ -223,6 +223,18 @@ class Tournaments:
db.commit()
return True
@staticmethod
def get_tournament_details(db, tournament_id):
with db:
with db.cursor() as curs:
curs.execute("SELECT * FROM Tournaments WHERE id = %s", (tournament_id,))
tournament = curs.fetchall()
if not tournament:
return False, None, None, None
tournament = tournament[0]
return True, tournament[1], tournament[2], tournament[3], list(map(int, tournament[4].split()))
@staticmethod
def add_event_results(db, event_id, results):
pass