"If he has a top-ten report"... is that a one-off thing?  Or is it a weekly
thing?  Or is that every time his report get's into the top ten (in which
case hovering around 10-11 would be the best bet!!)??

You need to decide WHEN the user is awarded the 50 points for being in the
top ten.

For example, if this was judged weekly, then you could write a small script
which is run weekly, awarding 50 points to the user_id's in the top 10
ratings... easy, but what happens to the guy who had something in there for
Sun-Thur, and you run the job on Friday?  Not good.

Or perhaps the points are awarded each time the top 10 changes... can't
imagine why!!  Yuk!

Or maybe you can only be awarded the 50 points ONCE, the FIRST time you're
in the top ten, in which case, I'd add a 4th field to Table "reports",
flagging it as "once a top ten", and apply the 50 points at that point.


Like I said, you need to define when this happens, so that we can figure out
the best way... or perhaps you'll figure it out for yourself after you have
a think about WHEN the 50 points are applied.


Justin French



on 11/07/02 7:30 PM, andy ([EMAIL PROTECTED]) wrote:

> ok here we go:
> 
> Table 1 user_table
> id
> points
> 
> Table 2 reports
> report_id
> user_id
> rating
> 
> The goal is to associate every user extra 50 points if he has a top 10
> report.
> Top 10 report means the 10 reports with the highest ranking. This value is
> always changing, thats why I did not include it to the other points.
> Now that we have the users with the additional points we could add them to
> the total points of the user and then find out the 5 users with the highest
> total points.
> 
> Thats the theory, but how to achieve this in real live??
> 
> Thanx for any idas,
> 
> Andy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to