[Help] Please, help with the users online

Newbie Spellweaver
Joined
Feb 24, 2014
Messages
21
Reaction score
0
Hi everyone, i have a problem whit the users online, when i tried to show the users online in the notice.php the users is incremented automatically in "concurrentuser" for example, in my server are 4 users in the notice.php are 4-6-8-10-12-14-16-18 ......... i tried to solve this, but i can´t maybe some one helpme please.
 
Newbie Spellweaver
Joined
Feb 24, 2014
Messages
21
Reaction score
0
Hi, i'm using this php

<?php echo $total = mysql_num_rows(mysql_query("SELECT * FROM concurrentuser")); //echo $total; ?>


Maybe u can help me with this problem, thanks
 
Junior Spellweaver
Joined
Oct 9, 2009
Messages
187
Reaction score
29

i already sum it so just replace the php query SELECT * FROM concurrentuser inside

concurrentuser is time based, its logs the online users per value, so even there is no player in the servers, its will just add rows in concurrentuser per minute.

if you have more than 2 servers, just add another

UNION SELECT
`UserCount`
FROM
`concurrentuser`
WHERE `Time` =
( SELECT
MAX(`Time`)
FROM
`concurrentuser`
WHERE `ServerPort` = '836x')
after
WHERE `ServerPort` = '8361')
in the current query
 
Junior Spellweaver
Joined
Oct 9, 2009
Messages
187
Reaction score
29

you dont need to count the rows, just display the row value returned.
 
Junior Spellweaver
Joined
Oct 9, 2009
Messages
187
Reaction score
29
use this one
 
Newbie Spellweaver
Joined
Feb 24, 2014
Messages
21
Reaction score
0
Hi bro, I have a problem, when I tried to join my other server (8361)I have a problem, how I can join the server 8360 and 8361? I'm use the sentence UNION, I'm using your PHP