From 6faaefdc690ef71ab69e0e4cca21306d5c5b8ec5 Mon Sep 17 00:00:00 2001 From: Arcala <138819070+ArcalaAlien@users.noreply.github.com> Date: Wed, 19 Feb 2025 23:27:53 -0500 Subject: [PATCH] Related to #2148: (#2270) * Added columns from the SELECT clause that were missing from the GROUP BY clause on line 529 that was causing the query to fail. * Increased query buffer size on line 513 from 512 to 544 to accomodate the extra characters needed. --- plugins/admin-sql-threaded.sp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/admin-sql-threaded.sp b/plugins/admin-sql-threaded.sp index c5ada3c7..2960ef1c 100644 --- a/plugins/admin-sql-threaded.sp +++ b/plugins/admin-sql-threaded.sp @@ -510,7 +510,7 @@ void FetchUser(Database db, int client) /** * Construct the query using the information the user gave us. */ - char query[512]; + char query[544]; int len = 0; len += Format(query[len], sizeof(query)-len, "SELECT a.id, a.authtype, a.identity, a.password, a.flags, a.name, COUNT(ag.group_id), immunity"); @@ -526,8 +526,8 @@ void FetchUser(Database db, int client) " OR (a.authtype = 'steam' AND (a.identity = '%s' OR a.identity = '%s' OR a.identity = '%s' OR a.identity = '%s'))", steamid2, steamid2alt, steamid3, steamid64); } - len += Format(query[len], sizeof(query)-len, " GROUP BY a.id"); - + len += Format(query[len], sizeof(query)-len, " GROUP BY a.id, a.authtype, a.identity, a.password, a.flags, a.name, immunity"); + /** * Send the actual query. */