Well if it is something you would like to do often and REALLY don't
like having to set a variable first, you could create a UDF, something
like ...
<cfscript>
function queryInstance( query ) {
instanceQuery = ARGUMENTS.query;
return "instanceQuery";
}
</cfscript>
<cfoutput query="#queryInstance( Instance.returnQuery() )#">
#instanceQuery.column1#<br />
</cfoutput>
On 11/8/05, Geoff Parkhurst <[EMAIL PROTECTED]> wrote:
> > That's a good point Robert - but I must admit the only time I
> > don't scope a variable is when I cfoutput it in a query. So I
> > would just reference the column name. I know, I know, I'm
> > being a bad boy - ok fine I'll stand in the corner for 30
> > mins... Happy? No... What else do you want from me!
>
> So, as per your original post:
>
> > <cfset instanceQuery= Instance.returnQuery() />
> > <cfoutput query="instanceQuery">
>
> Should you be doing:
>
>
> <cfset instanceQuery=Instance.returnQuery() />
>
> <cfoutput query="variables.instanceQuery">
> #variables.instanceQuery.column1#
> </cfoutput>
>
>
> Is this right? Or just extra unneeded verbage?
>
> Or even <cfset variables.instanceQuery=Instance.returnQuery() />
>
> A step too far?
>
> Geoff
>
>
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
>
>
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]