I’m looking to add a sort INT UNSIGNED field to my table so I can sort the items depending on their order without touching their id. Is it possible to give this column a value much like auto_increment but instead of incrementing by 1, MySQL increments by 10 or 20 or even 30? The large gaps allow me to shuffle their order.
I may be thinking about this the wrong way so please tell me what you think.
In fact, there is absolutely no need in “large gaps”.
You can always swap 2 numbers – that’s enough for the user-defined sorting.
Just update your sorting field to the same value with id initially and then move it to whatever position.