From 497203ad1fd4a7c083e6162797bc04ca385f4a8e Mon Sep 17 00:00:00 2001 From: DoganGFL Date: Thu, 3 Oct 2019 15:11:21 +0200 Subject: [PATCH] PlaytimeStats: integer --> integer unsigned --- PlaytimeStats/scripting/PlaytimeStats.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PlaytimeStats/scripting/PlaytimeStats.sp b/PlaytimeStats/scripting/PlaytimeStats.sp index 588d1108..f27057a6 100644 --- a/PlaytimeStats/scripting/PlaytimeStats.sp +++ b/PlaytimeStats/scripting/PlaytimeStats.sp @@ -65,7 +65,7 @@ public void OnClientDisconnect(int client) g_hDatabase.Escape(sName, sSafeName, sizeof(sSafeName)); char sQuery[512]; - Format(sQuery, sizeof(sQuery), "INSERT INTO playtime (auth,name,time) VALUES ('%d', '%s', '%d') ON DUPLICATE KEY UPDATE time=time+%d", iAuthID, sSafeName, iPlayTime, iPlayTime); + Format(sQuery, sizeof(sQuery), "INSERT INTO playtime (auth,name,time) VALUES ('%u', '%s', '%d') ON DUPLICATE KEY UPDATE time=time+%d", iAuthID, sSafeName, iPlayTime, iPlayTime); g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_Low); } @@ -81,7 +81,7 @@ public void SQL_OnDatabaseConnect(Database db, const char[] error, any data) g_hDatabase = db; char sQuery[512]; - Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS playtime (`auth` INTEGER, `name` varchar(128), `time` INTEGER, PRIMARY KEY (`auth`), INDEX (`time`))"); + Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS playtime (`auth` INTEGER UNSIGNED, `name` varchar(128), `time` INTEGER, PRIMARY KEY (`auth`), INDEX (`time`))"); g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_Low); }