From bc194a577dee03854eefee3d5e238b0de1f5336c Mon Sep 17 00:00:00 2001 From: Zwelf Date: Mon, 26 Dec 2022 11:57:03 +0100 Subject: [PATCH] Fix teamranks not getting removed or moved out of _backup table --- src/game/server/scoreworker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/server/scoreworker.cpp b/src/game/server/scoreworker.cpp index 5fb76d50f..de74fca13 100644 --- a/src/game/server/scoreworker.cpp +++ b/src/game/server/scoreworker.cpp @@ -548,7 +548,7 @@ bool CScoreWorker::SaveTeamScore(IDbConnection *pSqlServer, const ISqlData *pGam if(w == Write::NORMAL_SUCCEEDED) { str_format(aBuf, sizeof(aBuf), - "DELETE FROM %s_teamrace_backup WHERE GameId=?", + "DELETE FROM %s_teamrace_backup WHERE ID=?", pSqlServer->GetPrefix()); if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize)) { @@ -576,7 +576,7 @@ bool CScoreWorker::SaveTeamScore(IDbConnection *pSqlServer, const ISqlData *pGam CUuid TeamrankId = pData->m_TeamrankUuid; str_format(aBuf, sizeof(aBuf), - "INSERT INTO %s_teamrace SELECT * FROM %s_teamrace_backup WHERE GameId=?", + "INSERT INTO %s_teamrace SELECT * FROM %s_teamrace_backup WHERE ID=?", pSqlServer->GetPrefix(), pSqlServer->GetPrefix()); if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize)) { @@ -590,7 +590,7 @@ bool CScoreWorker::SaveTeamScore(IDbConnection *pSqlServer, const ISqlData *pGam } str_format(aBuf, sizeof(aBuf), - "DELETE FROM %s_teamrace_backup WHERE GameId=?", + "DELETE FROM %s_teamrace_backup WHERE ID=?", pSqlServer->GetPrefix()); if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize)) {