0

thanks for stopping by. I have a page, which is a leaderboard for my game (leaderboard is list of players and their acheivments)

I want to make a button which says something like 'Page 2--> Page 3-->' Every page shows exactly 25 players, to view the next 25 players you have to go to the next page. Lets say we are on page 3, and we are going to page 4. I want to show from player 100 to player 125.

I basicly want to do something which can do '-' results in Mysqli/Mysql If theres any other method to do this. Please say so.

Thanks

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43

1 Answers1

0

I'm not sure of having understood your problem, but to limit your query results, add the following clause on your mysql query:

LIMIT x,y

where x will be your starting register and y the number of registers you want to retrieve (ref).

E.g., to select from player 100 to 125:

SELECT player_fields FROM player_table WHERE whatever LIMIT 100,25
lpg
  • 4,897
  • 1
  • 16
  • 16