Hi Taydag
Got your e-mail. Em ... I tell you what I'd do: I'd just have a single column in the table, or even better a separate table, listing rankings. I'd stick a UNIX timestamp on it. In my query I'd then ask MySQL to calculate the age of the ranking. You can then display rankings any way you like: today, yesterday, last week etc.
I have a comments page in which I calculate the age of the comments and then only display the most up-to-date ones. The same system would work for displaying rankings of different ages.
Have a look at this: http://www.mysql.com/doc/en/Date_and_time_functions.html
I think this is a better approach than having columns which specify how old a ranking is. What do you do after today and yesterday? You'd have to either have a delete sequence or dump all the rankings into a column 'older that 48 hours'. It seems to me that your current approach is hard-coding time and will lead to a lot of unnecessary work. Your update function is fine, but you'd have to run it every time someone calls the page with the ranking display and thus increase overheads. If you have heavy traffic, the MySQL will be running extensive updates over an entire table every few seconds. I'd prefer to let time run and just do a simple calculation every time the ranking is called.
Does that help? If not, let me know.
Norm