fixed query again with extra checks this time

This commit is contained in:
Christian 2021-02-27 13:10:44 +01:00
parent eb9d88d94c
commit 712ab33cb3

View File

@ -654,9 +654,9 @@ public void CheckTop(int client, int index, int autismstate)
}
//we have index now from menu selection
if (l_iZoneCount < 2)
Format(sQuery, sizeof(sQuery), "SELECT name, `%s` FROM `zetimer_table` WHERE `%s` != 0.000 ORDER BY LENGTH(`%s`) ASC, `%s` * 1 ASC LIMIT 10", g_cMapname, g_cMapname, g_cMapname, g_cMapname);
Format(sQuery, sizeof(sQuery), "SELECT name, `%s` FROM `zetimer_table` WHERE `%s` != 0.000 ORDER BY LENGTH(`%s`) ASC, `%s` ASC LIMIT 10", g_cMapname, g_cMapname, g_cMapname, g_cMapname);
else
Format(sQuery, sizeof(sQuery), "SELECT name, `%sS%i` FROM `zetimer_table` WHERE `%sS%i` != 0.000 ORDER BY LENGTH(`%sS%i`) ASC, `%sS%i` * 1 ASC LIMIT 10", g_cMapname, index, g_cMapname, index, g_cMapname, index, g_cMapname, index);
Format(sQuery, sizeof(sQuery), "SELECT name, `%sS%i` FROM `zetimer_table` WHERE `%sS%i` != 0.000 ORDER BY LENGTH(`%sS%i`) ASC, `%sS%i` ASC LIMIT 10", g_cMapname, index, g_cMapname, index, g_cMapname, index, g_cMapname, index);
g_dDatabase.Query(SQL_Select_Top_Callback, sQuery, GetClientSerial(client));
}