PlaytimeStats: integer --> integer unsigned
This commit is contained in:
		
							parent
							
								
									a19ad81889
								
							
						
					
					
						commit
						497203ad1f
					
				| @ -65,7 +65,7 @@ public void OnClientDisconnect(int client) | |||||||
| 	g_hDatabase.Escape(sName, sSafeName, sizeof(sSafeName)); | 	g_hDatabase.Escape(sName, sSafeName, sizeof(sSafeName)); | ||||||
| 
 | 
 | ||||||
| 	char sQuery[512]; | 	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); | 	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; | 	g_hDatabase = db; | ||||||
| 
 | 
 | ||||||
| 	char sQuery[512]; | 	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); | 	g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_Low); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user