I've a table called "Ranking" which basically saves users ranking position sorted by their "points". It's:
*Id - Integer - A.I. (It's the position. 1 = first one. Highest points)
*IdUser - Integer
*PointsNow - Integer
*PointsBefore - Integer
*PositionBefore - Integer
What I'm trying to achieve is to have some method to know if an user went into a highest rank position or if he's lower now.
So for example, those are some entries:
1 | 2236 | 41 | 0 | 0
2 | 551 | 40 | 0 | 0
3 | 1557 | 34 | 0 | 0
So I though that I could achieve this doing this:
*Delete all entries
*Reset the autoincrement to 1
*Copy PointsNow to PointsBefore and Id to PositionBefore.
I'm not sure if I should do it this way, or if there's a more logical option. I'd appreciate some help.
Thanks