I'm building a CMS website where 5 images are displayed per page and the user can upload new images and select the position of the image / change the position after uploaded. I want to make it so that if you select a position (eg 2) that is already in use then the record that you are updating/adding will keep the position you have given it (ie 2), but the record that had that position before must be shifted down by 1 position (to 3) and the record that was 3 becomes 4 etc. I have no idea where to start with this. I'm using PHP 5.3.0 and MySql 5.1.36. Please let me know if you have any suggestions.