Sometimes you have a field used to order the presentation of rows to users. This might be to sequence tasks or (as used in Joomla) to decide the presentation order of articles.
As you use the field you can end up with odd numbers and, ideally you want a nice separated sequence so you can move or insert new tasks easily. To do that you need to be able to renumber the sequence, preserving the original ordering.
I have around 100 passwords for various websites and the like. Keeping track of them used to be a pain but it is now quick and convenient. I'm going to describe how I solved this problem with a simple secure solution you can implement for yourself with a 28 line bash script.
This comes up as a job every now and again and its a bit nerve wracking so here's my quick hackers guide to doing it. Don't expect to follow this verbatim but it should help you get the job done. You will need to be working at the linux command line and familiar with mysql client. Let me know if there is anything that needs clarifying or explaining further.
If you are doing this as a client service, take care with making any promises until you've done a dry run. If it is straightforward it will all be done in an hour. If it proves difficult, you could end up spending days on it. The key things that move it from 'straightforward' to 'difficult' are conflicts in extensions and hacks to Joomla itself. These are most likely to involve login and authentication issues or cached references to article ids.