Documentation / Resources / Statistics about the private messsages (Users with a lot of PMs archived)
3 sets to get statistics about PM usage.
Author: Oliver C.
Submitted by: Kilandor
Date: 2007-07-01 03:02
Comments: (0)
Ratings:
 
With phpMyAdmin, tab "SQL", run those SQL scripts to get...

The users with a lot of private messages archived :

SQL Code:

DROP TEMPORARY TABLE IF EXISTS tmp;
CREATE TABLE tmp SELECT pm_touserid, COUNT(*) AS pmcount FROM sed_pm WHERE pm_state=2 GROUP BY pm_touserid;
SELECT t.pm_touserid, u.user_name, t.pmcount FROM tmp AS t, sed_users AS u WHERE u.user_id=t.pm_touserid ORDER BY t.pmcount DESC, u.user_name ASC LIMIT 500;



Once done, optionally run this query to clean up the database :

SQL Code:

DROP TEMPORARY TABLE IF EXISTS tmp;
> 1 < [2] [3]
Copyright © 2008 Domain.Com. All Rights Reserved.
Page created in 0.514 seconds