View Single Post
Old 02-29-2008, 10:37 AM   #1 (permalink)
oMIKEo
The Contributor
 
oMIKEo's Avatar
 
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
oMIKEo is on a distinguished road
Default 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
Send a message via MSN to oMIKEo
oMIKEo is offline  
Reply With Quote