Rick, >Say, I've got two agents in the db. First has display-order 10, second has >display-order 20. A third agent is added who is to be displayed second, so >is given the display-order number 15 in the form. When the form is >submitted, >the first agent retains number 10, the new second agent's number is rounded >up from 15 >to 20, and the agent whose number was 20 now has the number 30. That way >there >are always values between the agents' display-order numbers to add new >agents. > >Make any sense? > >Would this be the best way to do this? Other ways?
There's no reason to use number in multiples of 10. Just store their real order and do something like: <cfset iNewUserOrder = 3 /> <!---// do this before inserting //---> <cfquery> update Employees set display-order = display-order + 1 where display-order >= #iNewUserOrder# </cfquery> Then ever user who's order was 3 or more is shifted up and then you can actually insert the new user at position 3. -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301154 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4