in coldfusion I used to do something like that<cffunction name="cfn_SectionDropBox_GradedbyDropBoxID"output="yes"access="remote"RETURNTYPE="query"><cfargument name="DropBoxID" type="numeric" required="yes" ><cfargument name="SectionID" type="numeric" required="yes" ><cfstoredprocprocedure="dbo.usp_SectionDropBox_GradedbyDropBoxID"datasource="#application.dsn#" ><cfprocparam value="#arguments.DropBoxID#"type="in"cfsqltype="cf_sql_integer"null="no"><cfprocparam value="#arguments.SectionID#"type="in"cfsqltype="cf_sql_integer"null="no"><cfprocresult name = "RS_SectionDropBox_GradedbyDropBoxID" ></cfstoredproc><cfreturn RS_SectionDropBox_GradedbyDropBoxID></cffunction>--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Put the function in your model
<cffunction
name="foo" returntype="query" output="false">
<cfset
var spQuery = "">
<cfstoredproc
datasource="#variables.wheels.class.connection.datasource#"
result="spQuery">
<cfreturn
spQuery>
</cffunction>
To call your function
<cfset page =
model("page").your function name(your arguments)>
<cfset page =
model("page").get(params.key)>.