Or you can join the two tables, which eliminates the dependency on the client timeout:

SELECT cfid, app, data FROM cdata WHERE cfid IN
(
        SELECT cfid FROM cglobal WHERE (lvisit >= DateAdd(N, - 30, GetDate()))
)

Then you can parse the [data] field for any client variables you want to retrieve the value of.


At 02:38 PM 3/28/02 -0500, you wrote:
    If your Client expiration data is low (0.1 days) then you could use CDATA and know how many people have loaded pages in the last 0.1days.
 
    Or if you have update lastvisited turned on in CF administrator then you can query
 
    SELECT count(*) as usercount
    FROM cglobal
    WHERE lastvisited > #createODBCdate(dateadd(n,-30,now()))#
 
    NOTE: both require that you have client variables turned on and the database as the repository
 
    Hope this helps
    Daniel D.
-----Original Message-----
From: Brian Brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:45 PM
To: [EMAIL PROTECTED]
Subject: Trying to display users currently on-line

Does anyone have any ideas about how to display the total active users on-line. Can it be done useing the CGLOBAL or the CDATA table? Or, do I need to set up a db table to track active users. Any help would be much appreciated.
 
Thanks
Brian


==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to