tested on dev, could not update time properly, adding table name and removing quotes causes the update queries to work

This commit is contained in:
Christian 2021-03-03 21:28:31 +01:00
parent 52003692fa
commit b3ffd0200a

View File

@ -510,9 +510,9 @@ public void FinishedStageRaceZone(int client)
int stage = player_stage[client];
char sQuery[g_dLength];
if (l_iZoneCount < 2)
Format(sQuery, sizeof(sQuery), "UPDATE `zetimer_table` SET `%s` = '%s', name = '%s' WHERE steam_auth = '%s' and LENGTH(`%s`) >= LENGTH('%s') and STRCMP(`%s`, '%s') > 0", g_cMapname, sTime, sEscapedName, sSID, g_cMapname, sTime, g_cMapname, sTime);
Format(sQuery, sizeof(sQuery), "UPDATE unloze_racetimer_css.zetimer_table SET `%s` = '%s', name = '%s' WHERE steam_auth = '%s' and LENGTH(`%s`) >= LENGTH('%s') and STRCMP(`%s`, '%s') > 0", g_cMapname, sTime, sEscapedName, sSID, g_cMapname, sTime, g_cMapname, sTime);
else
Format(sQuery, sizeof(sQuery), "UPDATE `zetimer_table` SET `%sS%i` = '%s', name = '%s' WHERE steam_auth = '%s' and LENGTH(`%sS%i`) >= LENGTH('%s') and STRCMP(`%sS%i`, '%s') > 0", g_cMapname, stage, sTime, sEscapedName, sSID, g_cMapname, stage, sTime, g_cMapname, stage, sTime);
Format(sQuery, sizeof(sQuery), "UPDATE unloze_racetimer_css.zetimer_table SET `%sS%i` = '%s', name = '%s' WHERE steam_auth = '%s' and LENGTH(`%sS%i`) >= LENGTH('%s') and STRCMP(`%sS%i`, '%s') > 0", g_cMapname, stage, sTime, sEscapedName, sSID, g_cMapname, stage, sTime, g_cMapname, stage, sTime);
if (StrEqual(g_csTime_record[client], "0.000"))
{