use correct first name

This commit is contained in:
def 2013-08-06 19:28:17 +02:00
parent 6d272e91b5
commit 53d6fe3db8

View file

@ -332,7 +332,7 @@ void CSqlScore::SaveTeamScoreThread(void *pUser)
pData->m_pSqlData->ClearString(pData->m_aNames[i]);
}
str_format(aBuf, sizeof(aBuf), "SELECT Name, l.ID, Time FROM ((SELECT ID FROM %s_%s_teamrace WHERE Name = '%s') as l) LEFT JOIN %s_%s_teamrace as r ON l.ID = r.ID ORDER BY ID;", pData->m_pSqlData->m_pPrefix, pData->m_pSqlData->m_aMap, firstName, pData->m_pSqlData->m_pPrefix, pData->m_pSqlData->m_aMap);
str_format(aBuf, sizeof(aBuf), "SELECT Name, l.ID, Time FROM ((SELECT ID FROM %s_%s_teamrace WHERE Name = '%s') as l) LEFT JOIN %s_%s_teamrace as r ON l.ID = r.ID ORDER BY ID;", pData->m_pSqlData->m_pPrefix, pData->m_pSqlData->m_aMap, pData->m_aNames[0], pData->m_pSqlData->m_pPrefix, pData->m_pSqlData->m_aMap);
pData->m_pSqlData->m_pResults = pData->m_pSqlData->m_pStatement->executeQuery(aBuf);
if (pData->m_pSqlData->m_pResults->rowsCount() > 0)