If I have references to session variables that are nested, do I need to lock
each reference separately or can I wrap the whole thing in one lock?
e.g.,
<cflock scope="session" timeout="30" type="exclusive">
<cfif #session.susertype# is not "admin">
<cfquery name="get_message" datasource=#variable.ds#>
select message_text
from vcross.messages
where
<cfif #session.susertype# is "student"> [LOCK HERE?]
message_type = 'student'
</cfif>
<cfif #session.susertype# is "faculty"> [LOCK HERE?]
message_type = 'faculty'
</cfif>
</cfquery>
<cfquery name="get_specific_message" datasource=#variable.ds#>
select message_text
from vcross.messages
where message_type = 'specific'
and user_id = #session.suser_id# [LOCK HERE?]
</cfquery>
</cfif>
</cflock>
~~~~~~~~~~~~~~~~~~~~~~~~
Ricq Pattay <[EMAIL PROTECTED]>
Univ of Minnesota - Twin Cities
College of Veterinary Medicine
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.