> The first time the user loads a page on my page (when the 
> session has started), I want the old dtLastAccessed value to 
> be stored in a temporary parameter. I then want to use that 
> parameter during the whole session. So I only want to read 
> the dtLastAccessed from the database once. Because when the 
> user loads other pages on the page, the dtLastAccessed in the 
> database will be replaced with a new time value.

Well, when you use Client variables they are automatically updated only when
you set them, but they are read from the database on each page request
(assuming that you chose to store your Client variables in a database, which
is usually a good idea).

> Maybe if I could store the parameter temporary under the 
> forum user in the database, and then check if it's set or 
> not. If it is set, then don't update the temporary parameter. 
> And then when the session ends, the temporary parameter in 
> the database is automatically set to NULL.
> 
> I don't know if that's possible though.
> What do you think?

That sounds like a lot of unnecessary work. Why not just track the value
within the Client or Session scope, then write it to the database when it
changes?

It's worth pointing out that you can only run code when a session ends if
you're using CFMX 7, which gives you an onSessionEnd event handler.
Otherwise, you'll have to do it prior to the session ending, since you won't
actually know when the session ends.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204810
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to