Working on a new application and I wanted to use UDFs to call queries
and return the recordset.
Not getting the results I am expecting.
Never really worked with running queries inside of <cfscript>
And not seeming o be able to pass the recordset name to the function.
<cfscript>
function fncQryGetAllUsers(recordset,orderby,sort) {
<cfquery name="#recordset#" datasource="DATABASE">
SELECT *
FROM USERS
ORDER BY #orderby# #sort#
</cfquery>
}
</cfscript>
This is the code im using, but also how would I set the recordset as a
return Parameter?
So that I could do something like this.
<cfloop query="#fncQryGetAllUsers('recordsetname','last_name','desc')#">
</cfloop>
Anyone done anything like this?
Have any ideas?
-chris.alvarado
[ application developer ]
4 Guys Interactive, Inc.
http://www.4guys.com
-- I can picture in my mind a world without war, a world without hate.
And I can picture us attacking that world, because they'd never expect
it. -- Jack Handy
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists