bPHP Posted October 21, 2010 Share Posted October 21, 2010 Hi! I'm trying to do a time ranking in the best possible way. Let me explain a bit. I have a table of users. Each of these users have name, id and reputation. From a form, the user can request certain rankings: by country, by city, and I'm trying to make the user to be able to select for example 'this year' ranking. Or 'this week'. That would organize the users according to the reputation in the last 7 days for example. Now, what is the best way to do this? Keep in mind that the number of users is as high as 100,000 and growing every day. Should I create a new table for week, year, month, and every x time update it? Any ideas or suggestions, I'm kind of lost on how can I achieve this in a clean way. Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/216484-generating-a-time-ranking/ Share on other sites More sharing options...
fenway Posted October 23, 2010 Share Posted October 23, 2010 Forgetting about performance for a moment, a simple order by clause and some variables/counters should do the trick. Quote Link to comment https://forums.phpfreaks.com/topic/216484-generating-a-time-ranking/#findComment-1125640 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.