• Welcome to Simple Machines Community Forum. Please login or sign up.
January 21, 2022, 09:40:05 AM


SMF 2.0.19 has been released! Please update. Read more.

Download System

Started by SMFHacks.com Team, October 31, 2007, 06:55:37 PM

Previous topic - Next topic


I see one can see the total downloads for each item. But how can I show the total downloads overall?

You see, I would like to display the total downloads of all my themes outside the downloads page on a custom page.. Something like "18m downloads"


Requires SQL query to get the data such as
// Get total downloads
$result = $smcFunc['db_query']('', "
SUM(totaldownloads) AS totaldownloads
FROM {db_prefix}down_file");
$row = $smcFunc['db_fetch_assoc']($result);

echo $row['totaldownloads'];

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


Yup. I figured that. When it comes down to SQL, I lack that knowledge lol. Ty.  ;)