you could try using fusionscript.  It's fairly new.
info at www.fusionscript.com

you can create functions that can call querys and return the information to
update forms

-----Original Message-----
From: chris.alvarado [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 12:55 PM
To: CF-Talk
Subject: RE: CF function to call queries


Ahhh,

Ok so how would one run a query within a cfscript block?

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 01, 2002 2:50 PM
To: CF-Talk
Subject: RE: CF function to call queries


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
> 
> 
> 


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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

Reply via email to