Let's say I have table of building info. I need to
recurse the info multiple times
attach temporary variables to each building's info
have the data persistent over multiple pages
speed is essential (part of an emergency notification system)
I see multiple ways to do this.
1) Load the data into a multi-dimensional array (except I still have a
mental block on doing this)
2) Load the data into parallel arrays, e.g.,
SESSION.arrBldgNames
SESSION.arrBldgWardens
SESSION.arrBldgWardenEmail
SESSION.arrBldgWardenEmailSent (temporary info)
etc.
Where arrBldgWardens[5] would match with arrBldgNames[5] (and there are
several more fields of data to be accessed).
3) Use an array + structure, e.g.,
<cfset SESSION.arrBldg = ArrayNew(1)>
<cfloop index="x" from="1" to="#BldgQuery.Recordcount#">
<cfset SESSION.arrBldg[x] = StructNew()>
<cfset SESSION.arrBldg[x].Name = BldgQuery.BldgName>
...
<cfset SESSION.arrBldg[x].EmailSent = False>
etc.
Does anyone have any idea which is more efficient insofar as memory used
or speed of accessing the data?
Larry V. Stephens
Indiana University
Office of Risk Management
[EMAIL PROTECTED]
812-855-9758
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274563
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4