I have two tables, one 'gift_limit_count' and one 'score' as follows:
'gift_limit_count' containing:
gift_id
gift_limit
gift_amount
'score' containing:
user_id
user_name
user_score
When a user's 'user_score' count gets to the next highest 'gift_limit' they are awarded with the 'gift_amount'. What i'd like to do is show a list of say, the top 10 users closest to their next award.
For example:
David(user_name) has 1 point to go before being awarded with £40 (gift_amount)
Suzi has 2 points to go before being awarded with £20
Ian has 2 points to go before being awarded with £40
Zack has 3 points to go before being awarded with £30
...
...