multiple auto increment in mysql

前端 未结 5 1589
Happy的楠姐
Happy的楠姐 2020-12-04 01:56

I\'m using php and mysql. I have a table with the id column set to auto increment as the primary key. I\'m trying to add another column called sort_order. The sort_order col

5条回答
  •  抹茶落季
    2020-12-04 02:24

    You may store 0 in sort_order and then sort by sort_order + id. Results will be same because sort_order will be exact 0 instead of id ( less on id)

提交回复
热议问题