In MySQL I have a table with a name, id, position, and content values. The content is loaded onto a page in php by querying by id. The position is used in php to create a dynamic menu with the menu items ascending by position value.
So for example, say There were 3 rows with each row having a position value of 1, 2, or 3. I am trying to build a form to allow the user to change the position of the menu, items, or add a new one. So if the row in position 3 wants to be changed to position value 1, then 2 needs to become 3 and 1 needs to become 2. Or if a new item is added, the position its taking and all below it need to be shifted up a value.
What would be the best way of approaching this? Any suggestions would be appreciated.