Previous Thread
Next Thread
Print Thread
Rate Thread
Daine #252330 10/17/2003 6:26 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Ignore my queries in this thread, they are unnecessary.

The w3t_Online table contains all the info we need already, we don't need to addy any fields to the database or do any update queries.

Everytime a page is loaded the Online-table get's updated with the latest stats for that user.

To get a list of all current online users (who was active in the last 10 minutes) you only need to do this:
Code
   $Outdated = $html -> get_date() - 600; <br />   $queryOnline = " <br />      SELECT t1.O_Username,t2.U_Visible,t2.U_Color,t2.U_Number <br />      FROM   {$threadspre}Online AS t1, <br />                                 {$threadspre}Users AS t2 <br />      WHERE  t1.O_Username = t2.U_Username <br />      AND    O_Last > $Outdated <br />      ORDER BY t1.O_Last DESC <br />   ";


Actually, the join isn't necessary, you only need the user id:s to be able to check against it to know if the online image should be lit or not next to each user.

Also, I think it would be possible to change the query that reads how many are browsing the current forum so that it also reads info about all who are online. I'll get working on that.

Sponsored Links
Entire Thread
Subject Posted By Posted
Online Status ericgtr 06/25/2003 2:37 AM
Re: Online Status msula 06/25/2003 2:45 AM
Re: Online Status JoshPet 06/25/2003 3:32 AM
Re: Online Status Gardener 06/25/2003 11:26 PM
Re: Online Status JoshPet 06/25/2003 11:27 PM
Re: Online Status Gardener 06/25/2003 11:31 PM
Re: Online Status JoshPet 06/25/2003 11:47 PM
Re: Online Status Gardener 06/25/2003 11:56 PM
Re: Online Status Catshadow 10/17/2003 12:48 AM
Re: Online Status JoshPet 10/17/2003 12:52 AM
Re: Online Status Gardener 10/17/2003 1:26 PM
Re: Online Status Gardener 10/17/2003 2:42 PM
Re: Online Status Catshadow 10/17/2003 3:26 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)