This example is missing locking. Sorry if I sound like a broken record -
but you _must_ remember to use locking. Also, you don't need cfoutputs
in cfquery tags - CF vars are automatically processed.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Haggerty, Mike [mailto:MHaggerty@;mbda.gov] 
> Sent: Monday, November 04, 2002 4:17 PM
> To: CF-Talk
> Subject: RE: Query caching
> 
> 
> Here's an example on CF 4.5:
> 
> <CFQUERY NAME="senate" DATASOURCE="resource">
>     SELECT            lastname, firstname, party, state, 
> website, email
>       FROM            senators
>     WHERE         state = '<CFOUTPUT>#session.state#</CFOUTPUT>'    
> </CFQUERY>
> 
> <cfset session.temp = senate>
> 
> <CFOUTPUT>#session.temp.recordcount#</CFOUTPUT>
> 
> -----Original Message-----
> From: Howie Hamlin [mailto:howie@;coolfusion.com]
> Sent: Monday, November 04, 2002 4:15 PM
> To: CF-Talk
> Subject: Query caching
> 
> 
> I have an application where I would like one or two queries 
> cached during a
> session.  I know that you can use
> cachedwithin to cache a query globally for an application but 
> I don't think
> that would be based on session...
> 
> So, is it possible to cache a query for a session?   If so, a 
> small code
> example would be appreciated.
> 
> Thanks,
> 
> --
> Howie Hamlin - inFusion Project Manager
> On-Line Data Solutions, Inc. - www.CoolFusion.com  - 631-737-4668 x101
> inFusion Mail Server (iMS) - The Award-winning, Intelligent 
> Mail Server
> >>> Find out how iMS Stacks up to the competition:
> http://www.coolfusion.com/imssecomparison.cfm
> 
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to