Let say I have this table,
ID Name Order
======== ======== =========
1 d 1
2 g 2
3 b 3
4 f 4
5 a 5
Now, from my UI user can change the order by drag drop. For example, he can move an item d to to item a place. Then my table will look like,
ID Name Order
======== ======== =========
2 g 1
3 b 2
4 f 3
1 d 4
5 a 5
Can any one tell me the SQL? I have input of ID, OldOrder and NewOrder.
You don’t even need the
IDparameter.