many thanks to all who answered - lessened my confusion beautifully.
One final quick question
in the code below I actually have 2 hidden fields
should there be any problems locking the 2 variables in the one lock as below
or should I use 2 separate locks??
<cflock scope = "Session" timeout = "20" type = "readonly">
<cfset variables.temp = SESSION.user_ID>
<cfset variables.temp_nick = SESSION.nickname>
</cflock>
Thanks again
Seamus
>As to your second situation, you could use the same approach:
>
><cflock scope = "Session" timeout = "20" type = "readonly">
> <cfset variables.temp = SESSION.user_ID>
></cflock>
>
><input type="hidden" name="user_id"
>value="<cfoutput>#variables.temp#</cfoutput>">
>
>tom
>www.basic-ultradev.com
>
>
>"Seamus Campbell" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
> > I'm still confused over locking!
> >
> > I have this sort of query
> > <cfquery name="get_expired" datasource="#request.DSN#">
> > SELECT User_ID, nickname, expiry_date
> > FROM tbl_client
> > WHERE user_id=#SESSION.user_ID#
> > </cfquery>
> >
> > I should lock the #SESSION.user_ID# but am I right in thinking that
>locking
> > the whole query is wasteful?
> >
> > If so how do I get around this?
> >
> > What are the best practices?
> >
> > And what about hidden fields in forms eg
> > <input type="hidden" name="user_id"
> > value="<cfoutput>#SESSION.User_id#</cfoutput>">
> >
> > Lock the whole form?
> > Lock just the above line??
> >
> > Any help would be appreciated (I have looked at Jim Schley's Best
>Practices
> > article and Ben Forta's article but they have confused me on the above 2
> > points)
> >
> > Many thanks
> >
> > Seamus
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists