With the main app I'm working on, the first thing in application.cfm is a
query to match the host header name against the correct website in the
database, then everything else is determined from there, including the
application name -- so I'm hosting multiple websites/customers off the same
code base, depending on what is in the database.

<cfquery name="rsOrganization" datasource="hosting" cachedwithin
="#CreateTimespan(0,0,30,0)#">
select * from rsOrganization where
OrgServername = '#CGI.server_name#'
</cfquery>

<CFAPPLICATION name="#rsOrganization.OrgShortname#_Root"
setclientcookies="Yes"
            clientmanagement="Yes"
clientstorage="hostingClientVariables"
            sessionmanagement="Yes"
sessiontimeout="#CreateTimespan(0,4,0,0)#"

applicationtimeout="#CreateTimespan(0,4,0,0)#" setdomaincookies="Yes">




On 4/9/06 5:15 PM, "Ken" <[EMAIL PROTECTED]> wrote:

> Hi. Is it ok to set certain application variables in application.cfm from
> values stored in the database?
> There are certain site-wide settings that I need to store in the database.
> Then do this in the application.cfm file:
> 
> <CFIF NOT IsDefined Application.MySetting1>
> 
> <cfquery name="myquery" dsn="dsn">
> Select Settings from db Where ....
> </cfquery
> 
> <cfset Application.MySetting1 = myquery..MySetting1>
> 
> </CFIF>
> 
> My questions are:
> 1. Is it ok to set application variables using the above method?
> 2. If I need to update the above Application.MySetting1 variable to a new
> value, how will I do so?
> 
> Thanks,
> 
> Ken.
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237304
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to