No but you can do this,

<cfset qName = "thisQuery">

<cfquery name="#qName#" datasource="someDSN">
        SELECT *
        FROM someTable
        WHERE ID = someID
</cfquery>

<cfset thisRecordCount = evaluate(toString(qName & ".recordCount"))>

Make sense?

-chris.alvarado
[ application developer ]
4 Guys Interactive, Inc.
http://www.4guys.com
phone: 281.807.4344 x1716
fax: 281.807.4384

"We create websites that make you a hero."



-----Original Message-----
From: Joshua Miller [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 16, 2003 5:39 PM
To: CF-Talk
Subject: RE: Macromedia TechNote on Database Performance


But that doesn't work when you do:

Query#ID#.RecordCount

I can get it to generate the query, just not call it ... It's moot point
though, I was an idiot in my thinking that the query name had something
to do with the cache :)

It's actually the QUERY and not the NAME that the cache is based on -
DUH!

Thanks,

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 
************************************************************************
*************
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]
************************************************************************
*************


-----Original Message-----
From: paul smith [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 16, 2003 6:02 PM
To: CF-Talk
Subject: RE: Macromedia TechNote on Database Performance


QUERY="MyQuery#ID#"

best,  paul

At 05:04 PM 1/16/03 -0500, you wrote:
>I'm having luck just changing some queries to Stored Proceedures ... 
>I'd like to use caching, but I can't figure out a way to specify 
>dynamic query names.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to