MyBB Community Forums
Something wrong - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Something wrong (/thread-171267.html)



Something wrong - Sazze - 2015-05-30

Hey,
If I use this query

$query = $db->simple_select("users", "COUNT(uid) AS activeusers", "lastvisit > '$timecut'");

 $activeusers = my_number_format($db->fetch_field($query, "activeusers"));


And then I get it using this {$activeusers}, it works but it gives me the total registered members instead.

Any idea?


RE: Something wrong - mmadhankumar - 2015-05-31

did you declare what $timecut equals to...


$timecut = TIME_NOW - 86400;



RE: Something wrong - Sazze - 2015-05-31

(2015-05-31, 06:28 AM)mmadhankumar Wrote: did you declare what $timecut equals to...


$timecut = TIME_NOW - 86400;

That did the trick, thank you!