02-29-2008, 10:37 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
|
Calculate user ranking
Hi,
I'm trying to work out how to rank a user based on their progress compared to other users.
Here is a simplified example of the structure:
Users
- id
Log
- id
- user_id
- book_id
Books
- id
A user can have multiple number of logs but duplications of the same book shouldn't be counted.
To calculate a book completion percentage i have
$percentage = round(($total_books / 100) * $total_number_of_unique_logs, 2)
but how would i calculate their progress compared to the percentage of other users?
Any help would be great.
Thanks, Mike
|
|
|