Hi Rick,

You don't want to add 10, you want to multiply by 10.  So you are looping 
the data:

<cfoutput query="getAgents">

Your cfquery would look like

UPDATE AgentsTable
SET displayorder = #currentRow# * 10
WHERE AgentID = #AgentID#

</cfoutput>

This will insert 10, 20, 30 etc. as the display order.

-- Josh


----- Original Message ----- 
From: "Rick Faircloth" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Wednesday, February 14, 2007 7:47 PM
Subject: RE: How to re-order items?


> That sounds like the approach I'm currently using in principle,
> I'm just doing the "insert correct number here" approach.
>
> Two questions...
>
> 1) For my approach, I can't figure out how to loop the query,
> assign the CurrentRow value to the Display_Order number,
> then add 10 that number.  My loops aren't changing the Display_Order 
> number.
> Suggestions?
>
> 2) For your approach, want to share the js solution?  I'm not much of
> a javascript coder, but perhaps it's doable...
>
> Thanks for the feedback, Dennis.
>
> Rick
>
> -----Original Message-----
> From: Dennis Powers [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 14, 2007 6:00 PM
> To: CF-Talk
> Subject: RE: How to re-order items?
>
>>> the best approach to ordering the display of Real Estate agents
>
> In just about all the applications we develop where sort order is required 
> I
> supply a "sort" field which is a numeric (int) field in the table.  I 
> create
> a page that retrieves the records to be sorted and displays the relevant
> part of the records ie: picture name, product name ...etc in a form select
> box. then use a javascript routine to allow them to click on an item and
> move the items up or down in the order.  The form gets submitted and the
> result page gets a list of ID's in sorted order. I loop through the ID's
> incrementing a counter and update the sort field for each ID with the
> counter.
>
> This gives the user full visual control without the "insert" correct 
> number
> here problem.
>
>
>
> Best Regards,
>
> Dennis Powers
> UXB Internet - A website design and Hosting Company
> 690 Wolcott Road
> P.O. Box 6029
> Wolcott, CT  06716
> Tel: (203)879-2844
> http://www.uxbinternet.com/
> http://www.uxb.net/
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269902
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to