You can't use cftags in cfscript. Please read the documentation on cfscript - it should explain a lot. Note that in CFMX you can write UDFs w/ the tag, <cffunction>. This would allow you to write queries in UDFs.
======================================================================= Raymond Camden, ColdFusion Jedi Master for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: chris.alvarado [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 01, 2002 3:45 PM > To: CF-Talk > Subject: CF function to call queries > > > 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 > > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.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

