Re: Getting Key In A Structure

2007-05-28 Thread James C. Montgomery
Sorry about the delay in getting back to this thread... First, thanks, Sean for the suggestion to use structKeyList() although it doesn't quite give me what I want. Brian and James had some valid questions, so let me answer them: As far as not passing the payOptionID, I could do that (and

Re: Getting Key In A Structure

2007-05-28 Thread James Holmes
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

Re: Getting Key In A Structure

2007-05-27 Thread Will Tomlinson
I was wondering why anyone would have a structure with numbers as keys, which is essentially the same as an array (but without the power of all of the array functions). I always thought structs were easier to work with. Will

Re: Getting Key In A Structure

2007-05-27 Thread Robertson-Ravo, Neil (RX)
: Will Tomlinson To: CF-Talk Sent: Sun May 27 12:28:14 2007 Subject: Re: Getting Key In A Structure I was wondering why anyone would have a structure with numbers as keys, which is essentially the same as an array (but without the power of all of the array functions). I always thought structs were

Re: Getting Key In A Structure

2007-05-27 Thread Brian Kotek
With an ID as the key you can easily pull things out of the struct. It's quite different from an array because the keys can be any number you need, not just sequential as they are in an array. On 5/26/07, James Holmes [EMAIL PROTECTED] wrote: I was wondering why anyone would have a structure

Re: Getting Key In A Structure

2007-05-27 Thread James Holmes
Sure, if you want a sparsely populated set of values with numbers as keys, but the example in the original post was sequentially numbered. On 5/28/07, Brian Kotek [EMAIL PROTECTED] wrote: With an ID as the key you can easily pull things out of the struct. It's quite different from an array

Re: Getting Key In A Structure

2007-05-27 Thread Brian Kotek
I assumed that was just coincidence since he referred to the key as the pay option ID. On 5/27/07, James Holmes [EMAIL PROTECTED] wrote: Sure, if you want a sparsely populated set of values with numbers as keys, but the example in the original post was sequentially numbered. On 5/28/07,

Re: Getting Key In A Structure

2007-05-26 Thread Brian Kotek
Also, just wondering why you'd be passing around the payOption (invoice) instead of the far more useful payOptionID (4)? On 5/25/07, Sean Corfield [EMAIL PROTECTED] wrote: structKeyList() On 5/25/07, James C. Montgomery [EMAIL PROTECTED] wrote: How can I access the value 4 of key in this

Re: Getting Key In A Structure

2007-05-26 Thread James Holmes
I was wondering why anyone would have a structure with numbers as keys, which is essentially the same as an array (but without the power of all of the array functions). On 5/27/07, Brian Kotek [EMAIL PROTECTED] wrote: Also, just wondering why you'd be passing around the payOption (invoice)

Getting Key In A Structure

2007-05-25 Thread James C. Montgomery
CFMX 7 If I have a structure stEventPayOptions like this: stEventPayOptions.PayOptionID, stEventPayOptions.PayOption with this data: 1, Cash or Check 2, Credit Card 3, Gift Card 4, Invoice how could I find the stEventPayOptions.PayOptionID key if I know the stEventPayOptions.PayOption value

Re: Getting Key In A Structure

2007-05-25 Thread Sean Corfield
structKeyList() On 5/25/07, James C. Montgomery [EMAIL PROTECTED] wrote: How can I access the value 4 of key in this structure? ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIA’s for your business. Upgrade