search

Home  >  Q&A  >  body text

php - How to sort tasks similar to tower, please give me some ideas

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

巴扎黑巴扎黑2771 days ago397

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座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.

    reply
    0
  • Cancelreply