Since it wasn't explicitly mentioned, and to sing home the point made
by others, you can also do stuff like this...

<cfset who = "Users">
<!--- this is the one that wasn't exampled --->
<cfset "qry#who#" = qryPeople>
<cfset queryName = "qry" & who>

<!--- as Barry mentioned --->
<cfoutput query="#queryName#">
</cfoutput>
<!--- pretty sure you can do this too --->
<cfoutput query=queryName>
</cfoutput>

IMO, It's only a bit confusing because some tags will expect a value,
and some will expect a string that will be auto evaluated to get the
value ie cfquery.

L8r.



On 9/2/08, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
> I believe that is what everyone has just said. Now as everyone else has
> stated, you DO NOT need to added the pound sign. In cases like this.
>
> <cfset variable.Something = someother.variable />
>
> Or
>
> <cfset variable.Something = someother.variable & " Append some string" />
>
> But the following code is different example when too. But can be written as
> the above example.
>
> <cfset variable.Something = "#someother.variable# Append some string" />
>
>
> The reason being is it is automatically evaluated, but the logic remains
> that if you do need to have it evaluated for output then
> <cfoutput>#variable.Something#</cfoutput>
>
> Or <cfdump var="#variables.something#" />
>
> But in the case of
>
> <cfoutput query="somequery">
>
> The rule doesn't apply, and there are a few tags like this. Not many but a
> few.
>
> This is vastly covered in the livedos.adobe.com website as well as the books
> / manuals if you bought them.
>
>
>
> --
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au
> Phone: +613 9015 8628
> Mobile: 0404 998 273
>
>
>
> -----Original Message-----
> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
> Of George Semaan
> Sent: Tuesday, 2 September 2008 4:10 PM
> To: cfaussie@googlegroups.com
> Subject: [cfaussie] Re: variables in cf
>
>
> Heya,
>
> In coldfusion putting pound signs around a variable outputs/evaluates the
> variable and gives you the value of the variable.
>
>
> Cheers,
> George
>
> -----Original Message-----
> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
> Of nedlud
> Sent: Tuesday, September 02, 2008 3:35 PM
> To: cfaussie
> Subject: [cfaussie] variables in cf
>
>
> Hi all,
>
> I've been in my current job for just over a year, which means I've
> been using coldfusion for just over a year, and I'm still learning how
> to use it.
>
> One thing that I keep tripping over is how to handle variables. I'm
> forever forgetting the goofy ## bits around them.
>
> But it just occurred to me that is (or might be) a simple way for me
> to remember.
>
> ## goes around variables passed by value.
>
> Variables passed by reference have no ##.
>
> Is this correct? Or am I just going to confuse myself more by thinking
> this way?
>
>
> The information contained in this e-mail communication may be confidential.
> You should only read, disclose, re-transmit, copy, distribute, act in
> reliance on or commercialise the information if you are authorised to do so.
> If you are not the intended recipient of this e-mail communication, please
> immediately notify the sender by e-mail and then destroy any electronic or
> paper copy of this message. Any views expressed in this e-mail communication
> are those of the individual sender, except where the sender specifically
> states them to be the views of Ninemsn Pty Limited. Ninemsn Pty Limited does
> not represent, warrant or guarantee that the integrity of this communication
> has been maintained or that the communication is free of errors, virus or
> interference.
>
>
>
> >
>

-- 
Sent from Gmail for mobile | mobile.google.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to