summaryrefslogtreecommitdiff
path: root/jfr_playoff/sql.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-17 15:21:29 +0100
committeremkael <emkael@tlen.pl>2018-02-17 15:21:29 +0100
commitab371e10931e1c42877a0758cdcb2144e886850f (patch)
treef11fae9f964c6d1ff19674d13f6b28a1a2c549c6 /jfr_playoff/sql.py
parentf2fe40754a9a63d1854885e17b0e304dbf4a834f (diff)
If a match is running, link to first unfinished segment
Fixes #6
Diffstat (limited to 'jfr_playoff/sql.py')
-rw-r--r--jfr_playoff/sql.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/jfr_playoff/sql.py b/jfr_playoff/sql.py
index ab6d0be..1eac414 100644
--- a/jfr_playoff/sql.py
+++ b/jfr_playoff/sql.py
@@ -33,6 +33,11 @@ WHERE #db#.segments.tabl = %s AND #db#.segments.rnd = %s
GROUP BY #db#.segments.tabl, #db#.segments.rnd
'''
+CURRENT_SEGMENT = '''
+SELECT LEAST(segmentsperround, segm+1)
+FROM #db#.admin
+'''
+
PREFIX = '''
SELECT shortname FROM #db#.admin
'''