Reordering of column data in mysql

后端 未结 4 1458
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-07 11:47

I have a table like so:

categoryID      categoryName
----------------------------
     1            A
     2            B
     3            C
4条回答
  •  死守一世寂寞
    2021-01-07 12:42

    The idea with Float sounds reasanoble, just don't show these numbers to a user -)

    Whenever user moves an entry up or down, you can figure out entries above and below. Just take their Order number and find mean value - that is a new order for the entry that has been moved.

提交回复
热议问题