I'm working on a dynamic navbar right now and I'm getting stumped on something. I've got an admin section that allows users to add and remove buttons to the navbar. It also allows them to change the order of the buttons by moving the button they are editing below another button selected from a list. I have no problem moving the buttons, but I do run into an issue when more than one button share the same position number. So whatever button was placed in that position first will stay on top. Make sense or totally confusing? Here's the db make up (simplified):
button_id
button_name
button_position
when the user selects which button they want to place the current button under the position is set by adding "1" to the selected buttons position. I can figure out how to either bump the other button that shares the same number down at the same time or get the value of both buttons the selected button will fall between so I can split the difference. Thanks for any advice.