I used the information on this post and it worked like a charm for me!
THANKS A LOT.
On showing users online code:
Quote:
WHERE session.lastactivity > $online[datecut]
|
I cant found $online variable.
Which file must I include in order to work?
And, how can I show the total numer of users online?
Here another question:
Maybe this is not the correct thread, but I think you can help me because it is a very similar problem.
I would like to show TODAY BIRTHDAY's on a non-vb page.
What I dontknow how to do is to compare today date DATE(now), with users.birthday_search and find thos users whose celebrate their birthday.
Any help?
Thanks in advance.
Quote:
Originally Posted by Pseudomizer
Users online:
PHP Code:
$onlineusers = $DB_site->query("
## GET ONLINE USERS ##
SELECT user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible,
user.usergroupid, session.userid, session.lastactivity,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM ".TABLE_PREFIX."session AS session
LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = session.userid)
WHERE session.lastactivity > $online[datecut]
ORDER BY ".iif($permissions['genericpermissions'] & CANSEEHIDDEN, 'invisible ASC, ')."username ASC");
Total Threads:
PHP Code:
$totalthreads = $DB_site->query("Select count(threadid) from thread where visible = '1' );
Cheers,
|