How to make a ranking in php?

Asked

Viewed 388 times

1

[Help] ranking in.php file

illustrative image: http://prntscr.com/kl11df

website image(main page): http://prntscr.com/kl12b3

image of the accounts created for testing: http://prntscr.com/kl13gz

I use Xamp, to show the created accounts I will have to enter the localhost/phpmyadmin. Good people I made a nomination for the top five ranking, I want to appear this ranking on the main page of the Site. Using sql for storing player count data, this ranking is to show the top rank in level. Thank you in advance

  • gesior acc already has this function of listing rankings, which version you are using?

  • I believe 8.54 Well I am new in the area of website, I only know how to remake some things, there is some social network or somewhere where I can take my doubt in chat?

1 answer

2

The ideal is you make clear which platform you are using, because who does not play this game will not know what relates.

Gesior ACC

Recent versions of Gesior Acc have this sidebar indicating the ranking, it is not necessary to redo the query, just switch to the ranking file.

If your version does not have by default this Feature, you will need a method in some existing class to list the top 5’s.

query

SELECT name, level FROM accounts ORDER BY level ASC LIMIT 5

Examples

If you don’t know how the project structure works, just take a look at Github (unofficial, if there is an official).

In that (Community) version in the folder /pages/ in the archive highscores.php has everything you need.

excerpt from the information

$skills = new Highscores($id, 100, $page, $world_id, $vocation);
  • 1

    "make it clear which platform you’re using" ... Like me... who didn’t know and voted to close. xd

  • Type, the platform is of a game rpg Online, I’m having difficulty in positioning the table of the ranking in the main page of the site and to make the script so that it works everything correctly

Browser other questions tagged

You are not signed in. Login or sign up in order to post.