vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   users online query help needed (https://vborg.vbsupport.ru/showthread.php?t=53614)

phill2003 05-31-2003 03:41 PM

users online query help needed
 
i have tried this

PHP Code:

$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

PHP Code:

$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 :)


All times are GMT. The time now is 12:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01255 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete