Forum
Search
Members
Help
Hello There, Guest!
Login
Username:
Password:
Lost Password?
Remember me
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help
Threaded Mode
/Top MySQL
K0P
Banned
Posts: 596
Threads: 75
Joined: Nov 2015
#1
12.02.2016, 09:53
Can anyone reply with an example script of MySQL /top command?
Find
Reply
Sascha
High-roller
Posts: 1,495
Threads: 131
Joined: Jul 2009
Reputation:
0
#2
12.02.2016, 10:00
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
Find
Reply
K0P
Banned
Posts: 596
Threads: 75
Joined: Nov 2015
#3
12.02.2016, 10:43
Get top 10 players with high scores and show them in a dialog
Find
Reply
«
Next Oldest
|
Next Newest
»
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
SA-MP
-- News and Updates
-- General
-- Client Support
-- Bug Reports
-- Screenshots and Videos
SA-MP Server
-- Server Support
-- Server Advertisements
SA-MP Scripting and Plugins
-- Scripting Help
---- Tutorials
---- Discussion
---- Help Archive
-- Gamemode Scripts
-- Filterscripts
---- Includes
---- Tools and Files
---- Maps
-- Plugin Development
SA-MP DL Edition
-- SA-MP 0.3.DL
---- Model Releases
Other
-- Everything and Nothing
Non-English
-- Languages
---- Nederlands/Dutch
------ Scripting Showroom en Discussie
------ Off topic
---- Español/Spanish
------ Lanzamientos/Releases
---- Français/French
------ Showroom
---- Русский/Russian
------ Релизы/Releases
---- Português/Portuguese
------ Lançamentos/Releases
---- Română/Romanian
------ Salonul Scripturilor
---- Archive
Users browsing this thread: 1 Guest(s)
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help