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
Senior Developer
Redsquare
[EMAIL PROTECTED]
Work: +61 2 8596 4067

Mobile: 0414 303965
49 Greek Street
Glebe, 2037
NSW, Australia
Visit us at www.redsquare.com.au for more information.
 

Reply via email to