[thelist] OT: Job Market

Aaron Johnson ajohnson at mindseye.com
Wed Apr 25 15:51:32 CDT 2001


Hey Michael,

No comments on the job market... but on your tip...

> <tip type="ColdFusion" author="Michael Buffington">
> Did you know that you can pass queries to a custom tag very
> easily?  Simply
> "copy" the query to the request scope like this:
>
>   <cfquery name="QueryName" datasource="#request.dsn#">
>   exec sp_foo
>   </cfquery>
>   <cfset request.QueryName= QueryName>
>
> In your custom tag, the query will be available by refering to the
> request.QueryName variable just as you would the original QueryName.
> </tip>


If you don't want to set the query to the request scope, you can also send
the query to your custom tag as an attribute, which may be a bit cleaner...
something like this:

<cfquery name="QueryName" datasource="#request.dsn#">
	exec sp_foo
</cfquery>

<cf_yourcustomtag
	qTheQuery="#queryname#">

That any other pages that run after your run your query don't see the
request scoped query variable.

Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<fax>617.350.8884
<icq>66172567
ajohnson at mindseye.com





More information about the thelist mailing list