get_var("SELECT sum(round(((data_length + index_length) / 1024), 2)) FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "'"); if($aDBc_db_size >= 1024){ $aDBc_db_size = round(($aDBc_db_size / 1024), 2) . " MB"; }else{ $aDBc_db_size = round($aDBc_db_size, 2) . " KB"; } // Total tables $aDBc_total_tables = $wpdb->get_var("SELECT count(*) FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "'"); // Total options if(function_exists('is_multisite') && is_multisite()){ $aDBc_options_toolip = " " . __('Indicates the total number of rows in your option tables of all your network sites, including transients...','advanced-database-cleaner') ." "; }else{ $aDBc_options_toolip = " " . __('Indicates the total number of rows in your options table, including transients...','advanced-database-cleaner') ." "; } // Total options $aDBc_total_options = 0; if(function_exists('is_multisite') && is_multisite()){ $blogs_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); foreach($blogs_ids as $blog_id){ switch_to_blog($blog_id); global $wpdb; $aDBc_total_options += $wpdb->get_var("SELECT count(*) FROM $wpdb->options"); restore_current_blog(); } }else{ // Count total options $aDBc_total_options = $wpdb->get_var("SELECT count(*) FROM $wpdb->options"); } // Total scheduled tasks $aDBc_all_tasks = aDBc_get_all_scheduled_tasks(); $aDBc_total_tasks = 0; if(function_exists('is_multisite') && is_multisite()){ foreach($aDBc_all_tasks as $hook => $task_info){ foreach($task_info['sites'] as $site => $info){ $aDBc_total_tasks += count($task_info['sites'][$site]['args']); } } }else{ foreach($aDBc_all_tasks as $hook => $task_info){ $aDBc_total_tasks += count($task_info['sites'][1]['args']); } } // Is MU? if(function_exists('is_multisite') && is_multisite()){ $aDBc_is_mu = __('Yes', 'advanced-database-cleaner'); $aDBc_number_sites = $wpdb->get_var("SELECT count(*) FROM $wpdb->blogs"); }else{ $aDBc_is_mu = __('No', 'advanced-database-cleaner'); $aDBc_number_sites = "1"; } ?>
  • />
  • />
  • />
  • />