I am thinking there has to be an easier way to do this then what I currently 
have.

I need to move a row in a Query object up or down.  Like imagine a page with 
little arrows on each record and you want record 2 to move to the position of 
record 1 and move record one to the position of record 2.

Then I want to delete the records from the table and insert the newly ordered 
records back into the database.

The direction I am currently going is to loop over the query object find the 
records that needs moved and start creating an Array for the new order 2,1,3,4 
etc.

Then use QueryAddColumn(getColors, "reOrder", "integer", reOrderArray) to 
insert the array into my query object.

Then user a Query of a Query to do a 
SELECT *
FROM getColors
ORDER BY reorder

Then delete the records and loop over the query object to insert back into the 
table.

Seems really overly complicated...  Can anyone think of a better way?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329575
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to