> Is there a problem with putting a cfif tag within a cflock? Here is an > example: > > <cflock timeout="45" throwontimeout="No" name="look_pick" > type="READONLY"> > <cfif session.picks is "Yes"> > </cflock> > > Do insert > > <CFELSE> > <CFLOCATION somewhere> > </CFIF> > > Would this cause any problems?
Improper nesting. Bad Developer! No biscuit! Better to do this: <cflock timeout="45" throwontimeout="No" name="look_pick" type="READONLY"> <cfif session.picks is "Yes"> Do insert <CFELSE> <CFLOCATION somewhere> </CFIF> </cflock> Or, to keep as much code in the CFLOCK as possible, this: <cflock timeout="45" throwontimeout="No" name="look_pick" type="READONLY"> <cfset sessionpicks = session.picks> </cflock> <cfif Variables.sessionpicks is "Yes"> Do insert <CFELSE> <CFLOCATION somewhere> </CFIF> __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists