fixed sql syntax errors
This commit is contained in:
parent
080b0be559
commit
5f24ccd723
@ -184,7 +184,7 @@ public Action SQL_Select_fingerprints(Handle hTimer, int Serial)
|
||||
GetClientIP(client, sIP, sizeof(sIP));
|
||||
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
|
||||
//steamID is unique but fingerprint might occur multiple times.
|
||||
Format(sQuery, sizeof(sQuery), "select steamid from ban_detector.ban_detector where fingerprint = (select fingerprint from ban_detector.ban_detector where steamid = '%s'", sSID);
|
||||
Format(sQuery, sizeof(sQuery), "select steamid from ban_detector.ban_detector where fingerprint = (select fingerprint from ban_detector.ban_detector where steamid = '%s')", sSID);
|
||||
//PrintToChatAll("sQuery: %s", sQuery);
|
||||
g_dDatabase.Query(SQL_FindFingerPrints, sQuery, Serial, DBPrio_Low);
|
||||
}
|
||||
@ -213,7 +213,7 @@ public void SQL_FindFingerPrints(Database db, DBResultSet results, const char[]
|
||||
|
||||
//god knows how big this might need to be
|
||||
char sQuery[4344];
|
||||
Format(sQuery, sizeof(sQuery), "select sb.authid from unloze_sourceban.sb_bans where sb.authid in (");
|
||||
Format(sQuery, sizeof(sQuery), "select authid from unloze_sourceban.sb_bans where authid in (");
|
||||
|
||||
//cant rely on IP cause several chinese players share VPN and end up with same IP despite clearly being different people.
|
||||
//now instead of fingerprint returns all steam IDs related to the specific fingerprint.
|
||||
@ -224,6 +224,7 @@ public void SQL_FindFingerPrints(Database db, DBResultSet results, const char[]
|
||||
results.FetchString(0, steamid, sizeof(steamid));
|
||||
if (first)
|
||||
{
|
||||
Format(steamid, sizeof(steamid), "'%s'", steamid);
|
||||
StrCat(sQuery, sizeof(sQuery), steamid);
|
||||
first = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user