Sure, instead of

<cfset theQuery = evaluate("caller.#attributes.query#")>

you would do

<cfset theQuery = caller[attributes.query]>

Query - why are you passing the name of the query instead of the query
itself??

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Sam Farmer [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, August 02, 2002 9:31 AM
> To: CF-Talk
> Subject: Re: Calling Queries
> 
> 
> Thanks Raymond.
> 
> I am on MX is there a magic cure on that?
> 
> Thanks,
> 
> Sam
> 
> 
> ----- Original Message -----
> From: "Raymond Camden" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, August 01, 2002 5:53 PM
> Subject: RE: Calling Queries
> 
> 
> > In this case, I believe you do need to use evaluate (unless 
> you are on
> > MX!). However, your code will use N evaluates, where N is 
> the rowcount.
> > You can get around this by doing one:
> >
> > <cfset theQuery = evaluate("caller.#attributes.query#")>
> >
> > Then your code gets MUCH easier:
> >
> > <cfoutput query="theQuery">
> > <option value="#theQuery[attributes.value][currentRow]#" etc
> >
> > 
> ==============================================================
> =========
> > Raymond Camden, ColdFusion Jedi Master for Macromedia
> >
> > Email    : [EMAIL PROTECTED]
> > Yahoo IM : morpheus
> >
> > "My ally is the Force, and a powerful ally it is." - Yoda
> >
> > > -----Original Message-----
> > > From: Sam Farmer [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, August 01, 2002 5:48 PM
> > > To: CF-Talk
> > > Subject: Calling Queries
> > >
> > >
> > > Hi,
> > >
> > > I am trying to rewrite an old custom tag of ours that takes
> > > in a query and
> > > outputs it with right options selected.  Nothing too
> > > tricky...except that I
> > > can not work out how to get around using evaluate.
> > >
> > > Anyone got any pointers?
> > >
> > > This is the code:
> > >
> > > <cfoutput query="caller.#attributes.query#">
> > >   <option value="#evaluate("#attributes.value#")#" <cfif
> > > listfind(attributes.selected,evaluate("#attributes.value#"))>S
> > > ELECTED</cfif>
> > > >#evaluate("#attributes.display#")#
> > >  </cfoutput>
> > >
> > > Thanks,
> > >
> > > Sam
> > >
> > >
> > >
> > >
> > >
> > 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to