True, but I didn't have to do -anything- to the existing query to get the
results. All I had to do is CFMODULE it, and then refer to it as
request.(query name). I didn't have to rewrite any of the original code; I
just had to change how I tried to refer to it.
> -----Original Message-----
> From: javier bernal [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 2:35 PM
> To: Fusebox
> Subject: Re: OT: Weird request scope discovery...
>
> If you use a module you can return the query using
> <cfset caller.qry_squid = qry_squid>
> The recordset will be available outside the module
> (from the 'caller' template)
> Cheers
> javier
> --- "McCollough, Alan" <[EMAIL PROTECTED]> wrote:
> > This is a bit weird, but sorta cool, too...
> >
> > I like putting SQL actions into a separate /SQL
> > directory.
> > Normally, I invoke these through a CFINCLUDE.
> > One on my SQL queries requires an attributes
> > variable to be set.
> > I tried calling this query through a CFMODULE
> > <CFMODULE template="/sql/qry_squid.cfm">
> > and then using the returned set as follows:
> > <CFLOOP query="qry_squid"> (I always name my queries
> > the same as the
> > filename minus .cfm)
> >
> > Well, this didn't work.
> >
> > BuTtTtTt...
> > <CFLOOP query="request.qry_squid"> works great!
> >
> > So therefore, (attempting to sound intelligent
> > here...)
> > IF you invoke a query via CFMODULE, the query
> > results are available through
> > the request scope as request.(query name)
> >
> > This is pretty cool, IMHO. Quite a boon for request
> > scope fanatics...
> >
> >
> > Alan McCollough
> > Web Programmer
> > Allaire Certified ColdFusion Developer
> > Alaska Native Medical Center
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists