Skip navigation
Mi-ul
Currently Being Moderated

Multiple returns from a function

Nov 11, 2011 7:14 AM

I've got 3 similar dynamic queries that I'd like to combine into a single function but called 3 times with different names on the same page. Is this possible?

 

The 3 queries when generated are different (mainly different date ranges) and are called from different <cfoutput query="xxx"> but the coded query is fundementally the same for each

 

Currently I'm using somethign along the line of:

 

<cffunction name = "flags">

<arguments 1>

</cffunction>

    

<cffunction name = "outstanding">

<arguments 2>

</cffunction>

 

<cffunction name = "jobs">

<arguments 3>

</cffunction>

 

<cfoutput query="flags">

...

</cfoutput>

<cfoutput query="outstanding">

...

</cfoutput>

<cfoutput query="jobs">

...

</cfoutput>

 

CFC has 3 separate functions all looking (basically) the same but with different <cfreturn name="flags" / Outstanding / jobs>

 

Is there a solution or not?

Do I need to explain it better?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points