Because a column is basically an array. Each row in the record set is an
element in that array

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Kay Smoljak
Sent: Monday, 4 February 2008 5:22 PM
To: [email protected]
Subject: [cfaussie] structure notation and queries


Hey guys,

Can anyone explain to me "why is it so":

when dynamically referencing a structure or an array, you would do:
Struct[dynamicIndexVariable].StructKey

Yet when you're dealing with a query, which I always understood to be
basically the same thing, internally, you have to do:
Query.ColumnName[dynamicIndexVariable]

I was just working through some code with someone learning CF and the first
time I got the query syntax the wrong way and it was hard to explain why it
was that way... it didn't make sense to him or me, really.

So is it an inconsistency in the language or is there a logical reason for
it?

Cheers,
K.

--
Kay Smoljak
business: www.cleverstarfish.com
standards: kay.zombiecoder.com
coldfusion: kay.smoljak.com
personal: goatlady.wordpress.com




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to