Support » Plugin: Download Monitor » [Plugin: WordPress Download Monitor] How to display total count for all files?

  • Resolved rguan

    (@rguan)


    Hello everyone,

    I want to display the total count number for all files, already tried the following codes but not working.

    1. The code displays nothing.

    <?php
        global $wpdb;
        $total_downloads = $wpdb->get_var("SELECT SUM(hits) FROM wp_download_monitor_stats ");
        echo $total_downloads;
    ?>

    2. The code displays “0”.

    <?php
        global $wpdb;
        $total_downloads = $wpdb->get_var( $wpdb->prepare("SELECT SUM(hits) FROM wp_download_monitor_stats") );
        return number_format_i18n($total_downloads, 0, '.', ',');
    ?>

    Does anyone who have a solution?

    Thanks a lot!

    http://wordpress.org/extend/plugins/download-monitor/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress Download Monitor] How to display total count for all files?’ is closed to new replies.