/Top MySQL - 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: /Top MySQL (
/showthread.php?tid=600724)
/Top MySQL -
K0P - 12.02.2016
Can anyone reply with an example script of MySQL /top command?
Re: /Top MySQL -
Sascha - 12.02.2016
What shall that command do?
If you are trying to order something of a mysql table, you can use the "ORDER" and "LIMIT" atts of mysql.
E.g. to get the top 10 post counts of a userdb you can use a query like that
PHP код:
SELECT * FROM `user` ORDER BY `postcount` DESC LIMIT 10
-> Order by postcount "DESC" -> Descending, highest first.
-> LIMIT 10 -> only returns the 10 highest
Re: /Top MySQL -
K0P - 12.02.2016
Get top 10 players with high scores and show them in a dialog