Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display the results of a function with returntype = "query"

Status
Not open for further replies.

gatsrulz

MIS
Sep 2, 2004
60
0
0
I have a function with return type query. How am I to loop over the result set to display the output. Please help.

My function is
<cffunction name="getdiv" returntype="query">
<cfargument type="numeric" name="per_no">
<cfquery name="div_place" datasource="NGSResearch">
select value from mac0216_p p, mac0216_pd pd,mac0216_ppv ppv where p.recno in
(
select placenum from mac0216_g g where (etype = 1005)and (per1 = #per_no# or per2 = #per_no# ))
and p.recno = ppv.recno and pd.uid = ppv.uid order by id
</cfquery>

<cfreturn div_place>
</cffunction>
 
if all the function does is call a query, why bother with the function?

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top