Hi, all...

I want to first thank everyone for the help and encouragement
you've given while I try to learn to use cfc's.

I'm trying to figure out the best way to solve this problem.

I've got a real estate agent page that displays their properties.
Sometimes they only have a few, or none.

What I want to do is determine how many properties they have displayed
and then, if it's less than 20, run another query that grabs the
number of properties equal to the difference between 20 and the
number of their displayed properties.  The idea is to have 20 properties
on an agent's page, some will be their listings, others not.

I've got the first query for the agents' properties in a cfc called,
"get_agent_properties".

I was setting up another function called, "get_extra_properties", but
I wasn't sure how to get a variable (argument) back to this function
from the first function.

Should I run the first query, get the record count and just use this:

<cfif get_agent_properties.recordcount lt 20>

        <cfset session.extra = 20 - get_agent_properties.recordcount>

and on the invoking page, just use:

<cfif session.extra gt 0>

        ...invoke the "get_extra_properties" function, using session.extra
        as an argument for how many properties to get in the query

</cfif>

???

Is this approach worth pursuing or is there a better way to handle the 
variables?

Thanks for any feedback.

Rick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:307578
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