Saturday, March 31, 2012

The Best Way (A Design Question)

Hello forum,

This is a question on the best approach to adopt to solve the following problem.

I have a list of names in one column and a numerical value in another. The table is then sorted by the second column largest to smallest.

When the database is updated, and the numbers in the second column change, I what to be able to display the amount by which a name has moved. Basically like a music chart would.

Yesterday Today
Smith 32 Jones 33 (+1)
Jones 32 Smith 32 (-1)
Lee 20 Cook 21 (+3)
Burns 20 Lee 20 (-1)
Payne 20 Burns 20 (-1)
Harris 20 Payne 20 (-1)
Cook 20 Harris 20 (-1)

To start, I guess I need a way of making a footprint of the values previous to the new update?

Any ideas would be gratefully received,
Thanks
Harold Clements

i'd say that you should make another column with the last number or do thecomputation in your code and save it in a column of the table.


That is the way I would approach it would be to have another column for the previous position then calculate the difference. Should be simple enough

0 comments:

Post a Comment