Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed SQL errors w/ wrong column name. #46

Merged
merged 1 commit into from Feb 13, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions game/addons/sourcemod/scripting/sourcebans.sp
Expand Up @@ -243,7 +243,7 @@ public Query_ServerSelect(Handle:owner, Handle:hndl, const String:error[], any:d
decl String:sFolder[32], String:sQuery[1024];
GetGameFolderName(sFolder, sizeof(sFolder));

Format(sQuery, sizeof(sQuery), "INSERT INTO {{servers}} (ip, port, game_id) \
Format(sQuery, sizeof(sQuery), "INSERT INTO {{servers}} (host, port, game_id) \
VALUES ('%s', %i, (SELECT id FROM {{games}} WHERE folder = '%s'))",
g_sServerIp, g_iServerPort, sFolder);
SB_Query(Query_ServerInsert, sQuery);
Expand Down Expand Up @@ -329,7 +329,7 @@ public OnConnect(Handle:owner, Handle:hndl, const String:error[], any:data)
decl String:sQuery[1024];
Format(sQuery, sizeof(sQuery), "SELECT id \
FROM {{servers}} \
WHERE ip = '%s' \
WHERE host = '%s' \
AND port = %i",
g_sServerIp, g_iServerPort);
SB_Query(Query_ServerSelect, sQuery);
Expand Down