Hello everybody,
I'd like to create a dynamic menu which means there should be a possibility to reposition the items of the menu up and down.
The stucture of the MySQL table is going to be something like this
+---------------------------+
| id | name | order_no |
+---------------------------+
| 4 | Tom | ? |
| 19 | Ann | ? |
| 25 | James | ? |
| 29 | Amber | ? |
+---------------------------+
'id' is auto_increment and let's say we have deleted some names that's why it isn't ordered.
How is the best way to set the order numbers and change the order (e.g. James to the second and Ann to the third)?