Quote:
Originally posted by JamesUS
PHP Code:
$jointime = (time() - $userinfo[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = "$userinfo[posts]";
} else {
$postsperday = sprintf("%.2f",($userinfo[posts] / $jointime));
}
|
Is it possible to run this code agains the db to get the user with the highest post per day?
Something like a "user of the day hack"
I tried it myself but i don't no how to do calculations with fieldvalues in a loop.
tia,
www.crapforum.nl