I am new to cfc's and I am having trouble in accessing query results in fusebox 
5.5.
I have app.cfc in users/controller and the code in it is following:

<cfcomponent output="false">
<cffunction name="dspUsers">
  <cfargument name="myFusebox" />
  <cfargument name="event" />
  <cfset getUsers = CreateObject ("component","users.model.usermanager") />
  <cfset getUsers = myFusebox.do( action="usermanager.qryUsers") />
  <cfset myFusebox.do( action="display.dspUsers", contentvariable="body" ) />
</cffunction>
</cfcomponent>

and I have usermanager.cfc in the users/model :

<cfcomponent output="false" hint="manage users">

<cffunction name="init" returntype="usermanager" access="public" output="false">
                <cfargument name="dsn" type="string" required="yes" />
                <cfargument name="dbUser" type="string" required="yes" />
                <cfargument name="dbPass" type="string" required="yes" />
                <cfset variables.dsn = arguments.dsn />
                <cfset variables.dbUser = arguments.dbUser />
                <cfset variables.dbPass = arguments.dbPass />
                <cfreturn this />
</cffunction>

<cffunction name="qryUsers" returntype="Query" access="public" output="false">
        <cfset var qryUsers = "">
        <cfquery name="qryUsers" datasource="pumas">
                SELECT  persons.person_id,
                                persons.person_firstname,
                                persons.Person_lastname,
                                persons.person_membership_type,
                                users.user_email,
                                users.created_on,
                                emails.email_confirmed_on
                FROM    persons INNER JOIN 
                                users ON persons.person_id = users.person_id 
LEFT OUTER JOIN
                    emails ON persons.person_id = emails.person_id  
                ORDER BY persons.person_firstname, persons.person_lastname
        </cfquery>
        <cfreturn qryUsers>
</cffunction>

</cfcomponent>

Now I am trying to display the results of qryUsers but qryUsers is not 
available there. I am creating an object but I don't know how to use it to 
access the results of the query. Please guide me. 

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

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

Reply via email to