>- see footer for list info -< Try just putting a number in there rather than using CreateTimeSpan()
Russ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of damien Sent: 19 August 2005 16:54 To: Coldfusion Development Subject: RE: [CF-Dev] cachedwithin in CFC >- see footer for list info -< Hi Russ, basically wanted to chache the first 2 queries... CALLING IT: <cfinvoke component="stockists" method="ListStockists" returnvariable="stockistHTML"> <cfoutput>#stockistHTML#</cfoutput> THE CFC: <cffunction name="ListStockists"> <cfquery name="qStockists" datasource="#request.dsn#" password="#request.pwd#" cachedWithin="#CreateTimeSpan(0,1,0,0)#"> SELECT * FROM tbl_Stockists ORDER BY Town </cfquery> <cfquery name="qTowns" datasource="#request.dsn#" password="#request.pwd#" cachedWithin="#CreateTimeSpan(0,1,0,0)#"> SELECT DISTINCT Town FROM tbl_Stockists ORDER BY Town </cfquery> <!--- cachedWithin="#CreateTimeSpan(0,1,0,0)#" ---> <cfsavecontent variable="StockistHTML"> <cfloop query="qTowns"> <cfoutput><h3>#Town#</h3></cfoutput> <cfquery name="qStockistAddress" dbtype="query"> SELECT name,address1,address2,town,county,postcode FROM qStockists WHERE qStockists.town = '#trim(qTowns.Town)#' </cfquery> <cfoutput query="qStockistAddress"> <p><blockquote><strong>#name#</strong><br /> <cfif address1 neq "">#address1#</cfif><cfif address2 neq "">, #address2#</cfif><cfif town neq "">, #town#</cfif><cfif county neq "">, #county#</cfif><cfif postcode neq "">, #postcode#</cfif> </blockquote></p> </cfoutput> </cfloop> </cfsavecontent> <cfreturn StockistHTML> </cffunction> -----Original message----- From: "Snake" [EMAIL PROTECTED] Date: Fri, 19 Aug 2005 13:11:16 +0100 To: "'Coldfusion Development'" [email protected] Subject: RE: [CF-Dev] cachedwithin in CFC > >- see footer for list info -< > It's probably somehting else in the template causing it, can we see > the rest of the code. > > Russ > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of damien > Sent: 19 August 2005 13:27 > To: Coldfusion Development > Subject: [CF-Dev] cachedwithin in CFC > > >- see footer for list info -< > Hi, I'm having a small problem with a query in a CFC. When I use > cachedwithin, I get an error on my page - something like: > > "Context validation error for tag cfquery. > The end tag </cfquery> encoutered on line 51 at column 19 > requires a matching start tag." > > Sample query: > > <cfquery name="qStockists" datasource="#request.dsn#" > password="#request.pwd#" cachedWithin="#CreateTimeSpan(0,1,0,0)#"> > SELECT * > FROM tbl_Stockists > ORDER BY Town > </cfquery> > > > Any ideas? > Damien > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go > to http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your > >help -< > > > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go > to http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your > >help -< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >-< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
