Quick Tip: Getting a List of All Instances of a Particular Variable

 
May 22, 2000
Peter Robertson recently asked:

"Can I, at any given moment, get a list of all ##session.someParticularVar## instances under a given ##application.applicationName## scope?

session_x.someParticularVar = val1 <BR> session_y.someParticularVar = val2 <BR>

etc ." Michael Smith, of TeraTech, Inc., passed on the following response, with a copy to us:

"There is a tool called SessionMagic that does this: SessionMagic Tool. This is Beta 1 of a suite of tags that lets you view all active sessions on a site as well as perform CFML code when a session times out.

"One way to code this yourself is, basically, in your application.cfm, to copy the session variables into a structure with key of the sessionid (the cftoken and cfid combined), then loop over this structure to display a particular session variable for all users."


Privacy | FAQ | Site Map | About | Guidelines | Contact | Advertising | What is ColdFusion?
House of Fusion | ColdFusion Jobs | Blog of Fusion | AHP Hosting