2011-05-11, 12:09 PM
2011-05-11, 12:15 PM
Do you want to get this information just from within your database (e.g. via phpmyadmin) or do you want it displayed in the forum/user profiles, etc.?
The search function http://community.mybb.com/search.php allows to select for a username and a date range (select "from yesterday" plus "and newer").
The search function http://community.mybb.com/search.php allows to select for a username and a date range (select "from yesterday" plus "and newer").
2011-05-11, 12:19 PM
I just want to get it from database currently, I'd know how to display it on user profiles and whatever if I had a database query. I'll take a look at that search script though.
2011-05-11, 12:29 PM
Today or the last 24 hours?
Today is starting from midnight until now and while the last 24 hours is something different.
You can use PHP?
Today is starting from midnight until now and while the last 24 hours is something different.
You can use PHP?
// last 24 hours
$dateline = time() - 86400;
$uid = intval($memprofile['uid']);
$db->query("SELECT COUNT(pid) AS num FROM mybb_posts WHERE uid='$uid' AND dateline > $dateline");
// today
$dateline = strtotime("midnight");
$uid = intval($memprofile['uid']);
$db->query("SELECT COUNT(pid) AS num FROM mybb_posts WHERE uid='$uid' AND dateline > $dateline");
2011-05-11, 12:58 PM
That did it perfectly. Thank you!
2011-05-11, 12:59 PM
(2011-05-11, 12:58 PM)Katrin Wrote: [ -> ]That did it perfectly. Thank you!
You're welcome