SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/12/2019, 11:11 AM   #1
RainbowAsher
Little Clucker
 
Join Date: Jul 2015
Posts: 12
Reputation: 0
Default How to get highest stats from mysql

So I'm making a top 5 players game highest money in server. But I don't know how to get highest player money from mysql. help please. Thanks
RainbowAsher is offline   Reply With Quote
Old 14/12/2019, 11:20 AM   #2
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 586
Reputation: 66
Default Re: How to get highest stats from mysql

Use the ORDER BY clause to sort the rows in a DESCending order LIMITing the results to only 5 rows, here's how it should look like:

Code:
SELECT `Money` FROM `Users` ORDER BY `Money` DESC LIMIT 5
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Old 14/12/2019, 11:39 AM   #3
RainbowAsher
Little Clucker
 
Join Date: Jul 2015
Posts: 12
Reputation: 0
Default Re: How to get highest stats from mysql

Quote:
Originally Posted by TheToretto View Post
Use the ORDER BY clause to sort the rows in a DESCending order LIMITing the results to only 5 rows, here's how it should look like:

Code:
SELECT `Money` FROM `Users` ORDER BY `Money` DESC LIMIT 5
Aight, lemme try. Thanks for responding
RainbowAsher is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with getting the highest kill streak ever on /stats GwENiko Scripting Help 3 23/09/2014 08:00 AM
Top 30 Players or Get Player With Highest Stats? Y_INI Blackazur Scripting Help 0 04/03/2014 04:31 AM
[Tool/Web/Other] [PHP/MySQL] Powerup Stats - Player stats signature generator kelvin22 Tools and Files 43 21/06/2013 12:15 AM
MYSQL Highest Field Value Ballu Miaa Scripting Help 4 10/11/2012 11:13 AM
[mysql] getting the highest integer in a column. The_Gangstas Help Archive 4 19/12/2010 11:29 PM


All times are GMT. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.