SQL: Add function to fetch tourney ids

This commit is contained in:
Worros 2011-02-11 17:51:18 +08:00
parent 4a7a24eb68
commit 2a586cf460

View File

@ -4342,6 +4342,13 @@ class Sql:
WHERE s.name=%s AND t.siteTourneyNo=%s
"""
self.query['getSiteTourneyNos'] = """SELECT t.siteTourneyNo
FROM Tourneys t
INNER JOIN TourneyTypes tt ON (t.tourneyTypeId = tt.id)
INNER JOIN Sites s ON (tt.siteId = s.id)
WHERE tt.siteId=%s
"""
self.query['getTourneyPlayerInfo'] = """SELECT tp.*
FROM Tourneys t
INNER JOIN TourneyTypes tt ON (t.tourneyTypeId = tt.id)