MySQL Forums
Forum List  »  Newbie

RANK() emulator?
Posted by: Maxime Michel
Date: September 21, 2009 01:25PM

I will be running a site with a Flash game, that will send data to a PHP script that will then send it to the database. Let's say my game has 500 levels. There will also be new levels every few days. I plan the userbase to be around 20,000 people, for a start.

I want to keep the highscore of everyone on each of these levels. So Person1 would have up to 500 scores in the db. I would then access those scores from different PHP scripts. There would be a page for the best score on each level, a page showing Person1 best scores for all levels, and probably other things in the future.

I was thinking making one huge table with all the scores instead of splitting them by levels (which would make over 500 tables).

My problem is the following: how can I know the rank of a person score? Let's say I have the columns User, Level and Score. If I wanted to know the rank of Dummy in level "Alpha", how would I do it?

Options: ReplyQuote

Written By
RANK() emulator?
September 21, 2009 01:25PM
September 21, 2009 01:33PM
September 21, 2009 02:09PM
September 21, 2009 04:23PM
November 07, 2009 10:27AM
November 11, 2009 03:18PM
November 08, 2009 03:52PM
November 09, 2009 10:56AM
November 09, 2009 04:42PM
November 09, 2009 05:38PM
November 09, 2009 08:18PM
November 10, 2009 06:21PM
November 10, 2009 09:22PM
November 11, 2009 09:19AM
November 11, 2009 08:36PM
November 12, 2009 08:39AM
November 12, 2009 08:00PM
November 13, 2009 06:41PM
November 17, 2009 10:35PM
November 19, 2009 10:35AM
November 17, 2009 10:38PM
November 19, 2009 10:16AM
November 19, 2009 10:32AM
November 19, 2009 10:39AM
November 19, 2009 10:45AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.