Fixed incorrect database name

This commit is contained in:
Jonathan Ervine 2020-11-19 16:05:40 +08:00
parent dd41718647
commit a3da216089

View File

@ -31,7 +31,7 @@ def hkfcD_motm_vote(randomUrlSuffix):
currMotM = nextInfo[0]['currMotM']
currDotD = nextInfo[0]['currDotD']
oppo = nextTeam
sql3 = "SELECT 2020_hockeyResults.hockeyFixtures.date, hockeyResults.hkfcDAdminSettings.nextFixture FROM 2020_hockeyResults.hockeyFixtures INNER JOIN hockeyResults.hkfcDAdminSettings ON 2020_hockeyResults.hockeyFixtures.fixtureNumber = hockeyResults.hkfcDAdminSettings.nextFixture"
sql3 = "SELECT hockeyResults2020.hockeyFixtures.date, hockeyResults.hkfcDAdminSettings.nextFixture FROM hockeyResults2020.hockeyFixtures INNER JOIN hockeyResults.hkfcDAdminSettings ON hockeyResults2020.hockeyFixtures.fixtureNumber = hockeyResults.hkfcDAdminSettings.nextFixture"
nextMatchDate = sql_read(sql3)
nextDate = nextMatchDate[0]['date']
formatDate = datetime.strftime(nextDate, '%A, %d %B %Y')
@ -139,7 +139,7 @@ def hkfcDMotmAdmin():
print(urlSuffix)
sql3 = "UPDATE hkfcDAdminSettings SET motmUrlSuffix='" + urlSuffix + "' WHERE userid='admin'"
sql_write_static(sql3)
flash('MotM URL https://hk-hockey.appspot.com/hkfc-d/motm/'+urlSuffix)
flash('MotM URL https://hockey.ervine.cloud/hkfc-d/motm/'+urlSuffix)
elif form.activateButton.data:
sql4 = "ALTER TABLE _hkfc_d_motm ADD COLUMN motm_" + _nextFixture + " smallint DEFAULT 0, ADD COLUMN dotd_" + _nextFixture + " smallint DEFAULT 0, ADD COLUMN assists_" + _nextFixture + " smallint DEFAULT 0, ADD COLUMN goals_" + _nextFixture + " smallint DEFAULT 0 "
sql_write(sql4)