I have a table in MySQL in which I stores events, that have fields called "event_order".
This field indicates which event happens when, for example event 1 has an event_order of 1, event 2 has an event_order of 2, etc.
Assume I have five events total - when editing details for event 1, I decide to change it's order to 3 instead of 1. This means that everything else will have to move down, event 2 moves into third event_order, while event 5 becomes event_1 (as it was the last event).
How can I have code that resorts the orders based off of the new order of event 1, as I would then take those new orders and save them to my table.