Documentation / Resources / Statistics about the private messsages (Users with a lot of PMs archived)
With phpMyAdmin, tab "SQL", run those SQL scripts to get...
The users with a lot of private messages archived :
Once done, optionally run this query to clean up the database :
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;
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;


























