Anyone have a script that updates the sort order of a table. Like if item 2 became 1 in the sort order the script would change the other records sort numbers. Previous 1 would become 2, 3 unchanged etc. Also, if 3 became 1 then 1 would become 2 and 2 would become 3.
id | sort | otherinfo
----------------------
32 | 1 |Bob
67 | 2 |James
88 | 3 |William
Pointers to articles about this welcome.
Thanks!
id | sort | otherinfo
----------------------
32 | 1 |Bob
67 | 2 |James
88 | 3 |William
Pointers to articles about this welcome.
Thanks!