I currently had help from nibbler on this and was wondering why it has stopped at 2GB, it will not increase, here's the code I'm using
Quote$sql = "SELECT sum(hits), sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']} as p " . 'LEFT JOIN ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'ON p.aid=a.aid ' . 'WHERE 1' . $pic_filter;
$result = cpg_db_query($sql);
$nbEnr = mysql_fetch_array($result);
$hit_count = (int)$nbEnr[0];
$total_filesize = (int)$nbEnr[1];
mysql_free_result($result);
if (count($cat_data)) {
$statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count,
'[total_filesize]' => round($total_filesize/1024/1024/1024, 2)
));
Would be great if anyone can help me with this ;D
Try like this:
$sql = "SELECT sum(hits), round(sum(total_filesize)/1024/1024/1024, 1) FROM {$CONFIG['TABLE_PICTURES']} as p " . 'LEFT JOIN ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'ON p.aid=a.aid ' . 'WHERE 1' . $pic_filter;
$result = cpg_db_query($sql);
$nbEnr = mysql_fetch_array($result);
$hit_count = (int)$nbEnr[0];
$total_filesize = $nbEnr[1];
mysql_free_result($result);
if (count($cat_data)) {
$statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count,
'[total_filesize]' => $total_filesize
));
I think the number got too large to be an integer.
Thanks that got it to increase, but its only showing as 2GB because I took out 1 of the 1024:
Quote/1024/1024/1024
and made it:
Quote/1024/1024
and it was showing as 2250GB
but if I add it again it goes back to 2GB, hope you understand, is there a way of getting it to show as 2.2GB
Thanks
Try now.
Thanks Nibbler, spot on mate ;D