Andrew,
I think you want to do something like this :
<cffunction name="getSmartUsers" access="remote"
returntype="query" output="false">
<cfset var resultSet = 0 />
<cfquery name="resultSet" datasource="dataSource">
SELECT
*
FROM
Users
WHERE
Clue > 0;
</cfquery>
<cfreturn resultSet />
</cffunction>
Initializing the resultSet variable to zero scopes it local to
the function. The cfquery block then re-initializes dataSet with
query data. Hope this helps. Credit here goes to a mach-ii
article I read somewhere( sorry, I forget the author's name. ).
- rob
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
---- On Fri, 5 Dec 2003, Andrew Scott ([EMAIL PROTECTED]) wrote:
> Hi All,
>
> Just a quick question, when developing CFC's I am under the
impression that
> any variable that is declared for a function (inside) should
be declared
> with a var. now if I have a query inside this how do I make
sure this query
> stays inside that function and that function only, I am not
worried anout
> the actual query name.
>
> More the cfquery.executiontime variable, or is this something
I should not
> pay too much attention too.
>
> I ask this because of Mach-II, the discussion about the
declaration of local
> cariables to be var for each function. Anyone have an idea if
this should be
> considered or ignored.
>
>
> Regards
> Andrew Scott
> Technical Consultant
>
> NuSphere Pty Ltd
> Level 2/33 Bank Street
> South Melbourne, Victoria, 3205
>
> Phone: 03 9686 0485 - Fax: 03 9699 7976
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
>
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]