OK, a database of information. A column dedicated to a display order. If I make changes, like move rows or if I delete rows or add rows to the end of the database then move them up or down.
I would prefer to keep the display order in sequential order with no gaps. like 1-2-3-4-5-6-7-8-9 if I delete a row 1-2-3-4-5-7-8-9 I may have problem later if I want to add a row after row 5 (in position 6). I would think to keep these numbers sequential with no gaps. Is that right? I have tried:
ALTER TABLE data DROP id;
ALTER TABLE data ADD id int(10) AUTO_INCREMENT;
I know that's not a good thing. Besides, when testing, it didn't keep my data in order.
Any ideas on managing a display order? Am I going to have to load all data into an array and manage it there? Seems like MySql would have a solution already???