jmlapam

Untitled

Jun 3rd, 2013
43
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* total dll */
  2. function jm_get_total_dll_count() {
  3. global $wpdb;
  4. $query = "
  5. SELECT sum(meta_value)
  6. FROM $wpdb->postmeta
  7. WHERE $wpdb->postmeta.meta_key = '_edmc-download-count'
  8. ";
  9.  
  10. $results = $wpdb->get_var( $wpdb->prepare($query,$meta_key) );
  11. return $results;
  12.  
  13. }
RAW Paste Data