Put Task 3 (Task 3 is in the third position) in the first position and put it from one category under another category. This is the idea of this process.
How to do tower-like sorting, please give me some ideas
滿天的星座2017-05-16 13:15:35
2 tables: categories and tasks. Tasks belong to categories, and there is a sorting field in the task table, such as position
. The default value is 1. Each time data is inserted, the maximum position value under the current category is obtained, and +1 is stored in the data.