Example:
INDEX | SOME_DATA
1 | some_data1
3 | some_data3
4 | some_data4
5 | some_data5
I want to add INSERT to add ---> 2 | some_data2. Is there an SQL command or some way to do this?
[edit]
OK. Perhaps if I explain everything I want to do, you will understand why I'm trying to do what I want. I am creating a web admin page in php that just displays data from a database table. Now these displayed lines are draggable. For example, you can drag row number 2 to say row number 4. now in the mouseup event i want to save the new order in the database.
1 | data1 ------------------------- > 1 | data1
2 | data2 ------- Drag ----- > 3 | data3
3 | data3 ------------------------- > 4 | Data4
4 | data4 ------------------------- > 2 | data2
. ? INDEX , . , . 3 2, 4 3 2 4. Thats too many sql updates ( ). №2 .