Ok - here are at least 2 "why dont you just"......
 
1. why dont you just... store the query and then re-query the query (we do that)
2. why dont you just... create a struct and use the ID as a key in that struct and then store the rest of the data as a struct under that key (we do that too)
 
If you want to maintain "order" in the second one (i.e. the order in which the ID's came back from the query) then we usually use an array as an index and point back at the same struct stored under the original ID being used as a key.
 
Option 2 is not unlike what you are already doing but using a struct for it helps get over the "missing" elements in the array (although CF arrays are sparse arrays in any case - i.e. you can have empty bits, you just need to KNOW there are empty bits).
 
Regards,
Gary

 
On 6/22/05, Chad Renando <[EMAIL PROTECTED]> wrote:
Have a question regarding arrays.  To minimize database calls in my
presentation layer using my own hacked framework, I am passing heaps
of stuff in arrays.  For a 2-dimensional array, is it bad juju to make
an ID the first array dimension, and place the appropriate value in
the second dimension?

So if "Red" was ID 75, my array would be: variables.MyArray[75]['red']

This leaves array locations 1 to 74 undefined.  I am thinking this is
bad when I get to ID 95,000.

Look forward to the first "why don't you just"...

Cheers,

Chad
who seriously doubts if any of this truly matters... but still wants an answer
(also known as hypocritical apathy)

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to