Log in

View Full Version : Forum Statistics - Showing PMs


rawnet
02-19-2002, 06:47 PM
Hi,

I'm really trying to push my boards (http://www.servicepals.com/forums/index.php) as a private as well as public discussion system, and would like to show the number of private messages sent in total - not necessarily the number of private messages stored in the database, but the total number that have been sent.

Can anyone give me any pointers as to how I achieve this?

All the best,

Ross

Scott MacVicar
02-19-2002, 07:24 PM
ok simpliest way is to read the next autoincrement value right out of the table.

in index.php look for
// if user is know, then welcome

above it add

$pmstats = $DB_site->query_first("SHOW TABLE STATUS LIKE 'privatemessage'");
$pmssent = number_format($pmstats[Auto_increment]);

then you can use $pmssent in the index templates.

rawnet
03-07-2002, 09:40 AM
That worked a treat!! Thankyou!! Using it on my forums now - amazed by how many PMs have been sent through the system - very encouraging.

Thanks so much for that dude,

Cheers for now,

Ross