View Full Version : How much space a member has used?
July 23rd, 2007, 06:35 PM
How do i find out how much disk space a particular member has used in the gallery?
July 23rd, 2007, 08:34 PM
That is not something I see in the gallery "yet". ;)
Perhaps a field in the user table that holds that info can be made. This way the info can be called on at anytime.
Below will get you the answer.
$userid = "1"; // userid 1
$usedspace = $db->query_first("SELECT SUM(filesize) AS normal, SUM(originalfilesize) AS original FROM " . TABLE_PREFIX ."ppgal_images WHERE userid = '$userid'");
$usedspace['total'] = $usedspace['normal'] + $usedspace['original'];
$spaceused = vb_number_format($usedspace['total'], 1, true);
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.