>Hi Matt. Do you can share this technique about
>store application/request vars in DB ? Interesting...
Sure, but given CF 6+'s handling of shared memory vars, I wouldn't
consider this unless you are on CF 5 or need to be compatible with it.
Anyway...
I have a table named Settings with, lets say, the following fields and
contents:
Settings.BaseHRef (http://foo.com)
Settings.SecureHRef (https://www.foo.com)
Settings.BasePath (d:\web\foo)
Settings.BGColor (##ffffff)
Then I put this in Application.cfm:
<cfquery
name="Settings"
datasource="#request.myDSN#"
maxrows="1"
cachedwithin="#CreateTimeSpan(0,0,0,10)#">
SELECT
Settings.BaseHRef,
Settings.SecureHRef,
Settings.BasePath,
Settings.BGColor
FROM Settings
WHERE
Settings.PrimaryKey='#SomeValue#'
</cfquery>
Then when I need to pull, say, the BGColor value I reference
Settings.BGColor, or pass it to whatever I'm calling.
I set this to 10 seconds, but it can be any other value you care to
name.
HtH,
--------------------------------------------
Matt Robertson [EMAIL PROTECTED]
MSB Designs, Inc. http://mysecretbase.com
--------------------------------------------
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

