MyBB Community Forums

Full Version: [s] Find 'SQL Engine' / 'Active Users' list ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
.
ACP/Home/Dashboard shows 'SQL Engine' with 17 'Active Users'.
Where to find that list... database, ACP, other ?

Also, if possible (not that familiar with 'SQL')... where to find good info about SQL, as relates to Mybb ?
Well SQL and MyBB are two different stuff. I mean in regards to your question, you find any guide or tutorial on SQL. SQL queries and information would not differ software to software. A good site to get started is http://www.w3schools.com/sql/
.
Thanks for the reply.
Maybe it will help understand the SQL Engine & SQL at the Database, but the real question is still regarding how to find the 'Active Users' list.
Any help with that ? Undecided

(2013-09-24, 03:09 AM)Arbaz Wrote: [ -> ]Well SQL and MyBB are two different stuff. I mean in regards to your question, you find any guide or tutorial on SQL. SQL queries and information would not differ software to software. A good site to get started is http://www.w3schools.com/sql/
active users number shown at admin panel is number of online users today (last 24 hours)
below code segment is from ./admin/modules/home/index.php file (starting around line 63)
// Get the number of new users for today
	$timecut = TIME_NOW - 86400;
	$query = $db->simple_select("users", "COUNT(uid) AS newusers", "regdate > '$timecut'");
	$newusers = my_number_format($db->fetch_field($query, "newusers"));

	// Get the number of active users today
	$query = $db->simple_select("users", "COUNT(uid) AS activeusers", "lastvisit > '$timecut'");
	$activeusers = my_number_format($db->fetch_field($query, "activeusers"));
so active users should be given by Who Was Online Today (forumURL/online.php?action=today)
.
Thanks much for the info !
Found the 'code'.
Not sure where to go from here, to actually find a list... use some of 'code' for SQL (at database) or use ACP 'find users' (although dont see 'todays active' as option)... ?
(2013-09-24, 07:29 AM).m. Wrote: [ -> ]active users number shown at admin panel is number of online users today (last 24 hours)
below code segment is from ./admin/modules/home/index.php file 9starting around line 63)
// Get the number of new users for today
	$timecut = TIME_NOW - 86400;
	$query = $db->simple_select("users", "COUNT(uid) AS newusers", "regdate > '$timecut'");
	$newusers = my_number_format($db->fetch_field($query, "newusers"));
	// Get the number of active users today
	$query = $db->simple_select("users", "COUNT(uid) AS activeusers", "lastvisit > '$timecut'");
	$activeusers = my_number_format($db->fetch_field($query, "activeusers"));
so active users should be given by Who Was Online Today (forumURL/online.php?action=today)
Re-looked.
Actually...
Who's Online
/forum/online.php
nor...
Who Was Online Today
/forum/online.php?action=today
...match 'Active Users', but close enough.

(2013-09-24, 07:29 AM).m. Wrote: [ -> ]active users number shown at admin panel is number of online users today (last 24 hours)
below code segment is from ./admin/modules/home/index.php file (starting around line 63)
// Get the number of new users for today
	$timecut = TIME_NOW - 86400;
	$query = $db->simple_select("users", "COUNT(uid) AS newusers", "regdate > '$timecut'");
	$newusers = my_number_format($db->fetch_field($query, "newusers"));

	// Get the number of active users today
	$query = $db->simple_select("users", "COUNT(uid) AS activeusers", "lastvisit > '$timecut'");
	$activeusers = my_number_format($db->fetch_field($query, "activeusers"));
so active users should be given by Who Was Online Today (forumURL/online.php?action=today)