summaryrefslogtreecommitdiff
path: root/dumps
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2022-01-16 22:11:37 +0100
committeremkael <emkael@tlen.pl>2022-01-16 22:11:37 +0100
commitf8d964a029a04eeb6e86a5299d6bcb94becbfe5e (patch)
treea61dc1b3df18ea062d4a6323c1e5f91df42c46b9 /dumps
parent57daa65a789aa472753953a54d1b3313b32dbe91 (diff)
Entry fee checks switched for 2022
Diffstat (limited to 'dumps')
-rw-r--r--dumps/.paid-queries14
-rwxr-xr-xdumps/check-paid.sh2
2 files changed, 8 insertions, 8 deletions
diff --git a/dumps/.paid-queries b/dumps/.paid-queries
index b6b4472..d174c3b 100644
--- a/dumps/.paid-queries
+++ b/dumps/.paid-queries
@@ -1,7 +1,7 @@
-dmp202122_1n 1 5
-dmp202122_1s 1 5
-dmp202122_2ne 1 5
-dmp202122_2se 1 5
-dmp202122_2nw 1 5
-dmp202122_2sw 1 5
-dmp202122_e 1 8
+dmp202122_1n 11 17
+dmp202122_1s 11 15
+dmp202122_2ne 11 15
+dmp202122_2se 11 15
+dmp202122_2nw 11 15
+dmp202122_2sw 11 15
+dmp202122_e 9 15
diff --git a/dumps/check-paid.sh b/dumps/check-paid.sh
index a9be3d8..3b864c8 100755
--- a/dumps/check-paid.sh
+++ b/dumps/check-paid.sh
@@ -4,5 +4,5 @@ PLAYERSDB=${LIGA_PLAYERS_DB_NAME}
ROUNDFROM=$2
ROUNDTO=$3
echo $DBNAME
-QUERY="SELECT dmpplayers.link, CONCAT(dmpplayers.gname, ' ', dmpplayers.sname), teams.fullname, CONCAT(segments.rnd, '-', segments.segment) FROM $DBNAME.butler butler JOIN $DBNAME.players dmpplayers ON dmpplayers.id = butler.id JOIN $PLAYERSDB.players players ON players.id = dmpplayers.link JOIN $DBNAME.teams teams ON teams.id = dmpplayers.team JOIN (SELECT rnd, segment, openN as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openE as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openW as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openS as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeN as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeE as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeW as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeS as pl FROM $DBNAME.segments) segments ON segments.pl = dmpplayers.id WHERE players.flag1 <> 'T' AND players.flag2 <> 'T' AND segments.rnd >= $ROUNDFROM AND segments.rnd <= $ROUNDTO ORDER BY dmpplayers.link, segments.rnd, segments.segment;"
+QUERY="SELECT dmpplayers.link, CONCAT(dmpplayers.gname, ' ', dmpplayers.sname), teams.fullname, CONCAT(segments.rnd, '-', segments.segment) FROM $DBNAME.butler butler JOIN $DBNAME.players dmpplayers ON dmpplayers.id = butler.id JOIN $PLAYERSDB.players players ON players.id = dmpplayers.link JOIN $DBNAME.teams teams ON teams.id = dmpplayers.team JOIN (SELECT rnd, segment, openN as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openE as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openW as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openS as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeN as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeE as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeW as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeS as pl FROM $DBNAME.segments) segments ON segments.pl = dmpplayers.id WHERE players.flag2 <> 'T' AND segments.rnd >= $ROUNDFROM AND segments.rnd <= $ROUNDTO ORDER BY dmpplayers.link, segments.rnd, segments.segment;"
echo $QUERY | mysql ${LIGA_MYSQL_CONNECTION_OPTS} -N