'LinKin Posted February 21, 2014 Posted February 21, 2014 Hi I've a SQL table. I want to sort it DESC by the value 'points'. I already know how to do that. But I what I want to do is to return something like this: 1. Account Points 2. Account Points 3. Account Points 4. Account Points 5. Account Points 77. myAccount my Points So I want to return the top 5 + my position in the table (so the rank) and my data. How can I do that? Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Castillo Posted February 21, 2014 Posted February 21, 2014 You are using executeSQLQuery? if so, then it returns a table, the index is the position. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
tosfera Posted February 23, 2014 Posted February 23, 2014 You are using executeSQLQuery? if so, then it returns a table, the index is the position. and after you got the table, you can use a loop to get the first 5 elements without writing 5 sentences. After that you should just select your own one. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
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