PDA

View Full Version : statistics on index page!


meowmeow
06-15-2004, 01:13 PM
--------sorry for the cross posting but its quite urgent, maybe here someone can help me-------
the forum statistics in the index page give some info about the forum.
one thing i'd like to change is the "newest member"
form index.php i can see it is taken from these two queries:


$members = ("SELECT COUNT(*) AS users, MAX(userid) AS max FROM " . TABLE_PREFIX . "user");

and
$newuser = ("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE userid = $members[max]");


I want to modify it so that instead of taking the MAX(userid) it takes the MAX(joindate)

so I changed it to this:


$members = ("SELECT COUNT(*) AS users, MAX(joindate) AS max FROM " . TABLE_PREFIX . "user");
and
$newuser = ("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE joindate = $members[max]");

still it doesnt work!
when i tried these 2 queries on a test script it worked, but on the forum it didnt change.
I dont know when functions_databuild.php is called, so it could be that it just hasnt refreshed, otherwise i don't know what i'm doing wrong!

meowmeow
06-16-2004, 06:28 AM
...anybody...