Hi Charles. Got a question for you. Say you updated the value of  the field
OrgShortname in the database, for one of the websites. How soon would the
application variable associated with it get updated?
Also, in your code, are you not loading the database too much, since you
have the query in your application.cfm file. How often is this query going
to run?

Thanks,
Ken


On 4/9/06, Charles Sheehan-Miles <[EMAIL PROTECTED]> wrote:
>
> 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.cfmfrom
> > 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:237307
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