php - Unique Primary Id exchange in on mysql? -


I found a SQL table that contains the data for a menu in the php page. Choose from

  ID LIMIT 0, 10   

* ID. Has been ordered. But IM asked to add order control on admin panel. Therefore, to rearrange menu items, above & amp; Below are the buttons.

I think there are two ways to do this.

One is to create a line called 'order' and change the SQL query:

  Segment 1, 10   

or

exchange ID from the `hizlierisim` command` command from SELECT *, the column we wanted to transfer and still the same Use SQL: ID range 1, 10

ID method seems easy but I wonder if there is a

  SELECT * from 'hizlierisim `Aa Esh is the possibility of exchanging ID on my SQL?   

Needing some arbitrary command with primary key areas is a bad idea, especially in a foreign key position Add 'Order' column (which is a reserved word, by the way, use something else if you want to save yourself some paints) is a practical option.

Comments