mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Use ExecuteUpdate
for SQL INSERT statements
Fixes ``` save score failed: (fetch:stmt:2014): Commands out of sync; you can't run this command now ```
This commit is contained in:
parent
2fb1c723c9
commit
83da81e8c3
|
@ -618,7 +618,8 @@ bool CScore::SaveScoreThread(IDbConnection *pSqlServer, const ISqlData *pGameDat
|
|||
pSqlServer->BindString(4, g_Config.m_SvSqlServerName);
|
||||
pSqlServer->BindString(5, pData->m_GameUuid);
|
||||
pSqlServer->Print();
|
||||
if(pSqlServer->Step(&End, pError, ErrorSize))
|
||||
int NumInserted;
|
||||
if(pSqlServer->ExecuteUpdate(&NumInserted, pError, ErrorSize))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -743,7 +744,8 @@ bool CScore::SaveTeamScoreThread(IDbConnection *pSqlServer, const ISqlData *pGam
|
|||
pSqlServer->BindBlob(4, GameID.m_aData, sizeof(GameID.m_aData));
|
||||
pSqlServer->BindString(5, pData->m_GameUuid);
|
||||
pSqlServer->Print();
|
||||
if(pSqlServer->Step(&End, pError, ErrorSize))
|
||||
int NumInserted;
|
||||
if(pSqlServer->ExecuteUpdate(&NumInserted, pError, ErrorSize))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue