How can I switch the DEBUG param of CFQUERY on or off, using 
a URL variable? (My hosting provider has this turned off in CF 
Administrator, and I'd like to be able to selectively display this info 
to resolve some live server issues. The query string "Mode=Debug" 
throws -- or is set to throw? -- a standard HTTP 500 error.)

You can't put the conditional clause INSIDE the opening 
CFQUERY tag, and even the following option throws an error:

<CFIF IsDefined("URL.DebugThisQuery")>
        <CFSET DebugVar="DEBUG">
<CFELSE>
        <CFSET DebugVar="">
</CFIF>

<CFQUERY NAME="test" #DebugVar#>
        SELECT * FROM Table
        WHERE ID=2
</CFQUERY>

Is there a way to do this short of repeating the entire CFQUERY 
statement for both conditions? 

I'm also wondering if anyone knows of a custom tag that will 
basically emulate the standard var and query debugging output, 
again for selective use in shared hosting situations. Had a look at 
the Allaire Dev Exchange, but maybe someone can recommend 
one...

Gene Kraybill

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to