Jump to content

[Solved]Sqlite Top 10 Values


Gus_ftw

Recommended Posts

Hi, i have problems to get the top 10values from a SQLite database.

The first code gives me the values but I want it to be sorted like from the richest players to the poorest players with a limit of 10 player.

Example.

1. 1,901,011$

2. 1,871,110$

3. 1,681,191$

etc.

1. code

function getData( ) 
    return dbPoll ( dbQuery ( db, "SELECT * From (Select * from data ORDER BY money desc) LIMIT 10 " ), -1 ) 
end 
setTimer(getData, 5000, 0) 

This is how this code returns:

b198f196de.png

Edited by Guest
Link to comment

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...