MyBB Community Forums

Full Version: Get daily top posters in php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I know there are lots of statistics plugins but i wan't to use it as a code somewhere.

This is an example from a plugin
$todaytime = TIME_NOW - 86400;
        $query = $db->query("SELECT u.uid,u.username,u.displaygroup,u.usergroup,u.avatar,COUNT(*) AS ptoday FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE p.dateline > $todaytime GROUP BY p.uid ORDER BY ptoday DESC LIMIT 0,".$mybb->settings['limititp']."");


I'm using phpmyadmin, so how can i view daily top posters and their post counts in phpmyadmin?

Thank you
you can follow this method
And how do i echo the result? It gives me resource id 85 error


edit: mysql_result() did the job.

Thank you
(2014-12-08, 08:22 AM)zontrakulla Wrote: [ -> ]And how do i echo the result? It gives me resource id 85 error


edit: mysql_result() did the job.

Thank you

Please Help ! I am trying to achieve something similar.

I want to be able to view the top poster on mybb forum over the period for one month.#


Could you please help me with the code I need to run ?

Thanks