It would be equally easy to swap any two items in the list, not just two adjecent items. Just swap sort_order values.
Yup... I think that is the key!
Basically as they are inserted I will look up the max sort_order value for that group so far and increase that by one for the current insert.
Then when it come to changing the sort order values I will simply swap it with the value of the previous or next one.
So only 2 updates.
The only thing I need to look out for is not to allow them to try and move the first row up... or the last row down.
Thanks for the help, Mike
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]