Sweeeeet.  Forgot about the Variables scope.

-- Josh




----- Original Message ----- 
From: "Sean Coyne" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Wednesday, August 30, 2006 10:12 AM
Subject: RE: Must I Use Evaluate() Here?


> Variables['q#dayspan#'].totalorders
>
> -----Original Message-----
> From: Josh Nathanson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 30, 2006 1:06 PM
> To: CF-Talk
> Subject: Re: Must I Use Evaluate() Here?
>
> Yup, looping over the collection if you have a structure is more elegant
> than using evaluate.
>
> Here's an interesting one though...I am dynamically generating
> queries/query names, is there any way to evaluate the query results
> dynamically without using evaluate?
>
> I would do a single query and then loop qoq's for better performance but
> I'm doing some SQL that qoq's can't do.
>
> the setter loop:
> <cfset dayslist = "0,1,7,30,90,365">
> <cfloop list="#dayslist#" index="dayspan"> <cfquery name="q#dayspan#"
> datasource="#Request.DS#"
> username="#Request.user#" password="#Request.pass#"> SELECT totalorders
> etc....
>
> This gives 6 queries named q0, q1, q7 etc.
>
> the evaluator:
> <cfloop list="#dayslist#" index="dayspan"> Evaluate('q' & dayspan &
> '.totalorders')
>
> ???????
>
>
>
> ----- Original Message -----
> From: "Aaron Rouse" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[email protected]>
> Sent: Wednesday, August 30, 2006 9:51 AM
> Subject: Re: Must I Use Evaluate() Here?
>
>
>>I think it gets forgotten about as an option more times than not.
>>
>> On 8/30/06, Teddy Payne <[EMAIL PROTECTED]> wrote:
>>>
>>> Regardless of the speed factor, why not use the loop structure that
> was
>>> made
>>> to handle structures? *rhetorical question*
>>>
>>> Teddy
>>>
>>
>>
>>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251510
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to