Could someone show me how to implement swap algorithm in php and mysql?
I have 4 records in a table
each are sorted by column position
say position 1 2 3 4
if I move an existing position from 4 to 1
number 1 will be moved to number 2
number 2 will be moved to number 3
number 3 will be moved to number 4
the the data that I want to move which is number 4
can now take the place of number 1
is there any other algorithm I can use instead of the one I already implemented but not working by the way
heres the post remained unsolved.
thanks in advance!