i have in a database a user, and a value. something along the lines of:
user/value
D1/1
D2/2
D3/3
etc etc
there is going to be a maximum of 8 values (1-8) but an unlimited number of users.
now i need a way of dynamically shifting the values from what is stored in the DB. Each shift of the value must be 2 places, so 1 -> 3, 2 -> 4, .... , 7 -> 1, 8 -> 2. I can do this once easily but if say i have to do 4 shifts of 2 (so the person in position 1 ends back up in position 1) i have no idea on how to get it done.
is there anyway to do this?