Use the request scope, you don't need to lock those.

<cfset request.dsn = application.dsn>
<cfset request.userid = session.userid>

<cfquery name="example" datasource="#request.dsn#">
 SELECT *
 FROM    users
 WHERE    users.userid = #request.userid#
</cfquery>





----- Original Message -----
From: "Deanna L. Schneider" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 04, 2000 7:52 AM
Subject: application and session variables together


> How do you lock when you have two different kinds of variables in the same
> query?
>
> For example:
> <cfquery name="example" datasource="#application.dsn#">
> SELECT *
> FROM    users
> WHERE    users.userid = #session.userid#
> </cfquery>
>
> Do you lock the where statement separately, nested in the overall
> application lock?
>
> (I'm using 4.0 here.)
>
> Thanks.
> -d
>
>
> ************************************************************
> Deanna Schneider
> Interactive Media Developer
> UWEX Cooperative Extension Electronic Publishing Group
> 103 Extension Bldg
> 432 N. Lake Street
> Madison, WI 53706
> (608) 265-7923
>
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to