hi,
i was
wondering if i have the following CFC
<cfcomponent>
<cffunction
name="fList1">
<cfquery name="qList">
select *
from users
</cfquery>
<cfreturn
qList.Recorccount>
</cffunction>
<cffunction
name="fList2">
<cfset var tempCount = 0>
<cfquery name="qList">
select *
from customers
</cfquery>
<cfscript>
tempCount =
fList1();
</cfscript>
<cfreturn qList>
</cffunction>
</cfcomponent>
the two queries
qList in Function fList1 and fList2 are GLOBAL Private variables queries,
hence its in the un-names scope
hence if i call
fList2() it
will return the Users Query Object
so they is a chance
of qList returning the wrong data
is this example
correct.. and does it make sence...:)
cheers
joel
Joel Nath | ||
|
