View Full Version : users online query help needed
phill2003
05-31-2003, 03:41 PM
i have tried this
$regmembers=$DB_site->query_first('SELECT DISTINCT COUNT(userid) AS membersonline FROM session WHERE userid>0 AND session.lastactivity>');
while($members = mysql_fetch_array($regmembers)) {
$regmemberson = number_format($members['membersonline']);
but it doesnt work can anybody help please..
filburt1
05-31-2003, 03:47 PM
How doesn't it work...?
Xenon
05-31-2003, 03:57 PM
it's obvious why it dosen't work.
$regmembers is a normall array which is the result of the query-first command.
mysql_fetch_array instead needs a mysql result, not an array
phill2003
05-31-2003, 04:02 PM
well i tried to put it into that signature hack thats on here, but when i do i get an error..
Parse error: parse error, unexpected $ in /usr/local/psa/home/vhosts/Talkshopforums.co.uk/httpdocs/board/signature.php on line 73
but that bit is the line after the ?>
phill2003
06-01-2003, 09:01 AM
$loggedins=$DB_site->query_first('SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity');
$numberguest=number_format($loggedins['sessions']);
will this one work do you think :)
Xenon
06-01-2003, 02:25 PM
yes, this will work
phill2003
06-01-2003, 04:04 PM
thanks :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.