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

News:

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

Mick.

vb,
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"

vbgamer45

Requires SQL query to get the data such as
// Get total downloads
$result = $smcFunc['db_query']('', "
SELECT
SUM(totaldownloads) AS totaldownloads
FROM {db_prefix}down_file");
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($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

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

Mick.

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

Advertisement: