coldfusion - How to run a cfquery within the onRequestStart() function? -
coldfusion - How to run a cfquery within the onRequestStart() function? -
i want run query on every page user requests. query needed preferences set user's organisation application. have tried:
<cffunction name="onrequeststart" access="public" returntype="boolean"> <cfargument type="string" name="targetpage" required="true"/> <cfquery name="rssettings"> select * dbo.settings </cfquery> <cfreturn true> </cffunction> </component>
however each pages looks rssettings
recordset says not defined. if set same query within each page needs works fine.
does onrequeststart()
not handle cfquery?
<cfquery name="request.rssettings"> select * dbo.settings </cfquery>
then in page use:
request.rssettings.columname
coldfusion coldfusion-10 coldfusion-11
Comments
Post a Comment