In this case, just to be annoying, I'd avoid the array - don't depend on PKs in a DB table being sequential. If you do a delete or something else happens, you will end up with empty array elements and this won't properly reflect the data.
Have you considered using the original query? This way you can get the payOptionID by using QoQ (which performs rather well for this kind of thing, considering you're now having to loop over the whole struct to find what you're after). On 5/29/07, James C. Montgomery wrote: > The reason I initially decided to go with a structure is as Brian > mentioned below - because the keys aren't sequential and I thought using > a structure might be best for that. I am now rethinking this and may use > an array. I am moving the database from MS Access to MySQL and it would > be trivial to reset the keys to sequential order when I convert that > table. But going back to my decision to use a structure to store the > payOptions and payOptionIDs, I was looking for a way to reach directly > into the structure and pull out the payOptionID if I had a known > associated payOption. I was able to do this by using a collection loop > over the structure to give me what I wanted. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279397 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4