Ratio & Order By - on SQLite. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Ratio & Order By - on SQLite. (
/showthread.php?tid=325521)
Ratio & Order By - on SQLite. -
Edvin - 13.03.2012
Hi, i want to make top 10 best admins from server. I want to make a ratio from kills, deaths, mutes, etc.
I make this:
Код:
new Float:ratio;
ratio = Float:PlayerInfo[ playerid ][ Mutes ], Float:PlayerInfo[ playerid ][ Warns ], Float:PlayerInfo[ playerid ][ Jails ], Float:etc...;
format( Query, sizeof( Query ), "UPDATE `Administration` SET `Ratio` = '%f' WHERE `Name` = '%s'", ratio, PlayerName( playerid ) );
db_Query( Database, Query );
I have somethink like that in my gamemode, but when i press /top command, it don't order from ratio, ...
Or how can i Order more rows from a SQLite database?
Re: Ratio & Order By - on SQLite. -
Richie© - 13.03.2012
ORDER BY ratio DESC