I can see Statistics of the users in my admin dashboard
http:/..../wp-admin/admin.php?page=wpProQuiz&module=statistics&id=1
I would like logged user could see his/her statistics in user dashboard.
How can I do it?
Thanks for help.
I can see Statistics of the users in my admin dashboard
http:/..../wp-admin/admin.php?page=wpProQuiz&module=statistics&id=1
I would like logged user could see his/her statistics in user dashboard.
How can I do it?
Thanks for help.
You can create page for it.
the basic code:
global $wpdb;
$my_db_pr = $wpdb->base_prefix;
$tst_usr = get_current_user_id();
$sql="SELECT qstat.points, qstat.question_id, qstat.answer_data FROM ". $my_db_pr ."wp_pro_quiz_statistic AS qstat JOIN ". $my_db_pr ."wp_pro_quiz_statistic_ref AS qref ON qstat.statistic_ref_id = qref.statistic_ref_id WHERE qref.user_id=".$tst_usr; $posts = $wpdb->get_results($sql);
any updates on this?
برچسب : نویسنده : استخدام کار wpss بازدید : 264