Login Register






MyBB - Who posted in the last 24 hours and how many posts did they make? filter_list
Author
Message
MyBB - Who posted in the last 24 hours and how many posts did they make? #1
PHP Code:
SELECT u.uid, u.username, s.total FROM mybb_users u INNER JOIN ( SELECT uid, count( * ) AS total FROM `mybb_posts` WHERE dateline >= ( UNIX_TIMESTAMP( NOW( ) ) - ( 24 *60 *60 ) ) GROUP BY uid )s ON u.uid = s.uid ORDER BY s.total DESC

Replace "mybb_" with your database prefix.
Credits to pavman from MyBB forums for this wonderful query! Smile
(This post was last modified: 04-18-2013, 05:34 PM by Oni.)

Reply





Messages In This Thread
MyBB - Who posted in the last 24 hours and how many posts did they make? - by Banadmin - 04-18-2013, 05:34 PM