How do I move up and down the data in the list?
Move the sort, the database set the Sort field, this field is added by default is the creation timestamp, the list default is by the creation time in reverse order.
Now I'm thinking how to get the data ID of the uplink or downlink in the page?
Reply to discussion (solution)
The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statement +1, but the service side of the data in sequence emissions, this demand, a little unclear so AH
Save the ID in the appropriate row data.
The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
Data ID Operations
A 1 Move Up down
B 2 Move Up down
C 3 Move Up down
My idea is to click on B to move up and pass the ID value of B and a to the processing file. But now do not know how to achieve the operation of Click B, while the ID of a pass through. In brief, how to get the ID of a while operating B.
Reference 1 Floor Hellodifa reply: The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
Data ID Operations
A 1 Move Up down
B 2 Move Up down
C 3 Move Up down
My idea is to click on B to move up, then pass the ID value of B and a to the processing text ...
This is the page operation, with JS to achieve
Reference 1 Floor Hellodifa reply: The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
Data ID Operations
A 1 Move Up down
B 2 Move Up down
C 3 Move Up down
My idea is to click on B to move up, then pass the ID value of B and a to the processing text ...
After clicking the button, it is to send Ajax asynchronous to operate, so that the page does not refresh, and to achieve the effect of moving up ~