Skip to content

Commit

Permalink
Added QMN Stats To System Info
Browse files Browse the repository at this point in the history
  • Loading branch information
fpcorso committed Dec 21, 2014
1 parent e98868b commit 88d8d68
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/mlw_help.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ function qmn_get_system_info()
$qmn_sys_info .= "MySQL : ".$wpdb->db_version()."<br />";
$qmn_sys_info .= "Webserver : ".$_SERVER['SERVER_SOFTWARE']."<br />";

$mlw_stat_total_quiz = $wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_quizzes LIMIT 1" );
$mlw_stat_total_active_quiz = $wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_quizzes WHERE deleted=0 LIMIT 1" );
$mlw_stat_total_questions = $wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_questions LIMIT 1" );
$mlw_stat_total_active_questions = $wpdb->get_var( "SELECT COUNT(*) FROM ".$wpdb->prefix."mlw_questions WHERE deleted=0 LIMIT 1" );

$qmn_sys_info .= "<h3>QMN Information</h3><br />";
$qmn_sys_info .= "Total Quizzes : ".$mlw_stat_total_quiz."<br />";
$qmn_sys_info .= "Total Active Quizzes : ".$mlw_stat_total_active_quiz."<br />";
$qmn_sys_info .= "Total Questions : ".$mlw_stat_total_questions."<br />";
$qmn_sys_info .= "Total Active Questions : ".$mlw_stat_total_active_questions."<br />";


return $qmn_sys_info;
}

Expand Down

0 comments on commit 88d8d68

Please sign in to comment.