enzopaul4 Posted October 23, 2016 Share Posted October 23, 2016 Hi i have a server connected with mysql and i want to make a top of players like , top player with money in bank How can i do it? Link to comment
3aGl3 Posted October 23, 2016 Share Posted October 23, 2016 As you're not giving more infos on your database structure here is how I would do it: local top_players = databaseQueryRaw( "SELECT * FROM `player` ORDER BY `money` ASC;" ) That will give you a table with all players data ordered by their money value. Link to comment
pa3ck Posted October 23, 2016 Share Posted October 23, 2016 He probably wants to have the top first, so I would use "DESC" rather than "ASC" and also a "LIMIT 20" or something like that so you only get the top 20. Link to comment
enzopaul4 Posted October 24, 2016 Author Share Posted October 24, 2016 I want to make like this http://imgur.com/9kJYO2W Link to comment
pa3ck Posted October 24, 2016 Share Posted October 24, 2016 In what way are you storing the players' money? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now