I agree with Raymond of course, but look, if you want to do inserts in a specific order, you can do that just as easily as you can present your data in a specific order. If you were going to order your data for presentation, you'd do something like this:
<cfset sorted = listSort(structKeyList(thedata), "numeric")> <cfloop list="#sorted#" index="i"> #i# : #structFind(theData, i)# </cfloop> That would present the data in the desired order. So just use the same convention in creating your inserts when you do the processing and you'll get the results you're seeking. <cfset sorted = listSort(structKeyList(thedata), "numeric")> <cfloop list="#sorted#" index="i"> insert into table(field) values(#structFind(theData, i)# </cfloop> Of course, each of your keys contains an array, so there's more work to be done in reality, but just because the data isn't sorted for you and just because it's silly to do it, doesn't mean you can't get it done.. Raymond Camden wrote: >Err... well I disagree. Again, sorting is just for presentation. You >shouldn't be storing that in the db. Your structure contains data. It >should only be concerned with that data. The front end handles making >it pretty, sorted, etc. > >On 6/20/05, Che Vilnonis <[EMAIL PROTECTED]> wrote: > > >>that sux! >> >>-----Original Message----- >>From: Raymond Camden [mailto:[EMAIL PROTECTED] >>Sent: Monday, June 20, 2005 1:52 PM >>To: CF-Talk >>Subject: Re: StructSort Question... I am stumped. >> >> >>Structs are NOT ordered. Therefore, there is no set way that it will >>be presented. As it stands, you normally would store the data as is in >>the db, and do presentation on the client. >> >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210013 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

