Let's try that again: <cfif> <cfset cache_time = CreateTimeSpan(2, 0, 0, 0)> <cfelse> <cfset cache_time = CreateTimeSpan(0, 0, 0, 0)> </cfif> <cfquery cachedwithin="#cache_time#"></cfquery>
Rob -----Original Message----- From: Rob O'Brien Sent: Thursday, September 20, 2007 4:36 PM To: 'cf-talk@houseoffusion.com' Subject: RE: Darn syntax Give this a go: -----Original Message----- From: Robert Harrison Sent: Thursday, September 20, 2007 3:07 PM To: CF-Talk Subject: Darn syntax I've got the table driven system with all these profile reads. The profiles don't change often so I want to cache unless I'm testing. If I'm live I want my cache time at several days. So I set: <cfset cache_time="2, 0, 0, 0"> OR <cfset cache_time="0, 0, 0, 0"> Now on my profile query statement, instead of saying cachedwithin="#CreateTimeSpan(2, 0, 0, 0)#" I want to say cachedwithin="#CreateTimeSpan(#cache_time#)#" But it don't like that. I've tried various combos using and not using EVALUATE, etc. but it just doesn't want to obey me. Anyone see the correct syntax. I'm sure this is nothing more than a syntax problem but I'm not seeing it right now. Thanks, Robert B. Harrison Director of Interactive services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be &. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289043 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4