php - How to sort tasks similar to tower, please give me some ideas
巴扎黑2017-05-16 13:13:35
0
1
401
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
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.
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.