PDA

View Full Version : Show how much space each user is taking up in attachments


BamaStangGuy
10-29-2004, 04:18 AM
It would be cool if someone could make a small hack that would show the users total attachment totals, sortable by total amount and username

Beermonster
10-29-2004, 08:26 AM
If you go to your AdminCP/Attachment/Attachment Statistics you can get the top 5

Andreas
10-29-2004, 08:41 AM
SELECT SUM( filesize ) AS total, user.username
FROM attachment
LEFT JOIN user ON ( user.userid = attachment.userid )
GROUP BY attachment.userid
ORDER BY total DESC


or ORDER BY total ASC, ORDER BY username DESC, ORDER BY username ASC

BamaStangGuy
10-31-2004, 08:25 PM
SELECT SUM( filesize ) AS total, user.username
FROM attachment
LEFT JOIN user ON ( user.userid = attachment.userid )
GROUP BY attachment.userid
ORDER BY total DESC


or ORDER BY total ASC, ORDER BY username DESC, ORDER BY username ASC
Thanks that worked