Think of it as a 3 dimensional box. 
   +---------+
  /          /|
 /          / | 
+----------+  |
|          |  |
|          |  |
|          | /
+----------+/

Hehe

Okay here is a example... not that you 
would but you could.

If you think of a query as a two dimesonal array.

Query1(z)
        Row1(y)
                Col1(x)
                Col2    
                Col3
                Col4
                Col5
                Col6
        Row2
                Col1
                Col2
                Col3
                Col4
                Col5
                Col6
Query2
        Row1
                Col1
                Col2    
                Col3
                Col4
                Col5
                Col6
        Row2
                Col1
                Col2
                Col3
                Col4
                Col5
                Col6

As an array
arrJunk[1][1] = Row one column one
arrJunk[2][3] = Row two column three.. etc. etc.

Now say you want this single array to represent multiple
queries at once.

so arrJunk[1][2][4] = Query1, Row2, Column4
or arrJunk[2][2][4] = Query2, Row2, Column4

Now for say a four dimensional array... hehehe stay with me!!
Time: 8:00pm(eeek)
        Query1(z)
                Row1(y)
                        Col1(x)
                        Col2    
                        Col3
                        Col4
                        Col5
                        Col6
                Row2
                        Col1
                        Col2
                        Col3
                        Col4
                        Col5
                        Col6
        Query2
                Row1
                        Col1
                        Col2    
                        Col3
                        Col4
                        Col5
                        Col6
                Row2
                        Col1
                        Col2
                        Col3
                        Col4
                        Col5
                        Col6
Time: 9:00pm
        Query1
                Row1
                        Col1
                        Col2    
                        Col3
                        Col4
                        Col5
                        Col6
                Row2
                        Col1
                        Col2
                        Col3
                        Col4
                        Col5
                        Col6
        Query2
                Row1
                        Col1
                        Col2    
                        Col3
                        Col4
                        Col5
                        Col6
                Row2
                        Col1
                        Col2
                        Col3
                        Col4
                        Col5
                        Col6
So (this would be a bad way to represent your data...
but if you wanted too... you could....

Okay, so say you wanted 9pm Query2 Row2 Col5

arrJunk[2][2][2][5] = 9pm, query2, row2, column5

Hehe, so yes the practical applications of this kind
of thing are few and far between but there are some very 
valid representations such as mapping out objects
in 3D space (of course you wouldnt really use an
array then.. but anyways) it does have
uses... but if you end up with a 3D array you most
likely do not need it.

Anyhow... I hope I did not hurt anyones head.

Jeremy Allen
elliptIQ Inc.



>-----Original Message-----
>From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
>Sent: Monday, February 05, 2001 1:35 PM
>To: CF-Talk
>Subject: RE: 3-dimensional array
>
>
><CFSET myarray = arraynew(3)>
>
>
>
>
>-----Original Message-----
>From: Ryan Farrell [mailto:[EMAIL PROTECTED]]
>Sent: Monday, February 05, 2001 12:24 PM
>To: CF-Talk
>Subject: 3-dimensional array
>
>
>How do I <cfset> a 3-dimensional array?
>
>Thanks,
>
>Ryan
>
>
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to