multiple auto increment in mysql

前端 未结 5 1619
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:40

    Maybe add a timestamp and sort on that, which actually adds meaning to your data model. A "sort_order" column means you're putting presentation (view) logic into your data model, which is a Bad Thing.

提交回复
热议问题