i am creating a database table that is going to store menu links that will ultimately show up on a web page.
My issue is that i want to control the order of the menu items. I could have a field called order but everytime i have a new menu link i would have to insert the order and change all of the records with higher order to +1.
For example, lets say i want the links ( in this order):
Home About Products Shopping
i could have a table called MenuLinks and have the columns: Name, Order
my data would look like this:
Name Order Home 1 About 2 Products 3 Shopping 4
but if i wanted to now add a new link called ContactUs but i wanted to show up right under home.
can anyone think of a better way to store a list that requires ordering in a database table without this tedious maintenance effort.