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