Jump to content

Returning Ranks


'LinKin

Recommended Posts

Posted

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.

Posted

You are using executeSQLQuery? if so, then it returns a table, the index is the position.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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. :)

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...