Personally, I would do it in a way where you can set the name of the
variable that is going to store the query in the calling code. i.e. I would
avoid something like this as it can lead to ambiguity over where the
qry_users variable is set:

<cfinclude template="queries/QRY_getusers.cfm">
<cfloop query="qry_users"></cfloop>

Somthing like this would be better if you can get it to work in CF5 (works
in CF8):

<!--- calling template --->
<cfmodule template="queries/QRY_getusers.cfm" result="qry_users"
dsn="#request.dsn#">

<!--- module --->
<cfparam name="attributes.result" default="result" type="variableName">
<cfparam name="attributes.dsn" default="foo">
<cfquery name="qry_user" datasource="#attributes.dsn#">
 *SELECT* * *FROM* FbUser
</cfquery>

<cfset caller[attributes.result] = qry_user>


Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295766
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to