From 7068c22a1ff56545df3a863aee074c81a536be6d Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 30 Sep 2022 23:30:29 +0200 Subject: Switching paid checks to both calendar years + players checks also involve players missing from DB (=not paid on either years) --- dumps/check-teams.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dumps/check-teams.sh') diff --git a/dumps/check-teams.sh b/dumps/check-teams.sh index ecf78a5..8cd3e31 100755 --- a/dumps/check-teams.sh +++ b/dumps/check-teams.sh @@ -6,7 +6,7 @@ cat .cezar-teams-$DBNAME | while read TEAM CEZARTEAM do echo "UPDATE teams SET internet = $CEZARTEAM WHERE id = $TEAM;" done | mysql ${LIGA_MYSQL_CONNECTION_OPTS} $DBNAME -QUERY="SELECT dmppl.link, CONCAT(dmppl.gname, ' ', dmppl.sname), TRIM(t.shortname), TRIM(pl.loc2), CONCAT(lineup.rnd, '-', lineup.segment) FROM $DBNAME.players dmppl JOIN $PLAYERSDB.players pl ON dmppl.link = pl.ID JOIN $DBNAME.teams t ON t.id = dmppl.team JOIN ( +QUERY="SELECT dmppl.link, CONCAT(dmppl.gname, ' ', dmppl.sname), TRIM(t.shortname), TRIM(pl.loc2), CONCAT(lineup.rnd, '-', lineup.segment) FROM $DBNAME.players dmppl JOIN $DBNAME.teams t ON t.id = dmppl.team JOIN ( SELECT rnd, segment, openN as pl FROM $DBNAME.segments UNION SELECT rnd, segment, openS as pl FROM $DBNAME.segments @@ -22,7 +22,7 @@ UNION SELECT rnd, segment, closeE as pl FROM $DBNAME.segments UNION SELECT rnd, segment, closeW as pl FROM $DBNAME.segments -) lineup ON lineup.pl = dmppl.id -WHERE t.internet <> pl.info +) lineup ON lineup.pl = dmppl.id LEFT JOIN $PLAYERSDB.players pl ON dmppl.link = pl.ID +WHERE COALESCE(t.internet, '') <> COALESCE(pl.info, '') ORDER BY dmppl.link, lineup.rnd, lineup.segment;" echo $QUERY | mysql ${LIGA_MYSQL_CONNECTION_OPTS} -N -- cgit v1.2.3