diff options
author | emkael <emkael@tlen.pl> | 2024-01-21 18:35:35 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2024-01-21 18:35:35 +0100 |
commit | 5f03959bfe785f6e9837b6dfc982067be251548f (patch) | |
tree | 8b295a01cf455edba95af864d386ad6f732e13a9 /dumps/check-paid.sh | |
parent | befbdb5aa4eca7d429330a7a0ff0057b9eddeac4 (diff) |
Paid fee check update for new calendar year
Diffstat (limited to 'dumps/check-paid.sh')
-rwxr-xr-x | dumps/check-paid.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dumps/check-paid.sh b/dumps/check-paid.sh index 3cf1244..68ea146 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), players.flag1, players.flag2 FROM $DBNAME.butler butler JOIN $DBNAME.players dmpplayers ON dmpplayers.id = butler.id LEFT 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 (COALESCE(players.flag2, 'N') <> 'T' AND COALESCE(players.flag1, 'N') <> '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), players.flag1, players.flag2 FROM $DBNAME.butler butler JOIN $DBNAME.players dmpplayers ON dmpplayers.id = butler.id LEFT 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 (COALESCE(players.flag2, 'N') <> '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 |