sheriw
Forum Replies Created
-
Thanks Eli. Very helpful and great to have the updated version.
This particular query below is one that’s not working now after the update: It produces “No results” – Can you take a look at this query below? Thanks, Sheri
It’s for this short code:
[SQLREPORT name=”Language Arts Quizzes and Tests 2016 – 2017″]This is my test url:
https://discoveryk12.com/dk12/pportal-grade-book-language-arts-quizzes-tests-2016-2017/?ID=2&first_name=Summer&last_name=Brooks&start_date=2016-07-01&end_date=2017-06-30This is the query:
SELECT CONCAT(‘&last_name=<?php $_GET[last_name] ?>&ID=<?php $_GET[ID] ?>&Quiz_ID=’,
wp_wp_pro_quiz_master
.Id
,'”>’,wp_wp_pro_quiz_master
.name
,’‘) ASQuiz or Test
, SUM(wp_wp_pro_quiz_statistic.correct_count) AS Correct, SUM(wp_wp_pro_quiz_statistic.incorrect_count) AS Incorrect, (Round(SUM(wp_wp_pro_quiz_statistic.correct_count) / SUM(wp_wp_pro_quiz_statistic.incorrect_count + wp_wp_pro_quiz_statistic.correct_count),2)) * 100 AS Percent FROM (wp_wp_pro_quiz_statistic_ref INNER JOIN wp_wp_pro_quiz_master ON wp_wp_pro_quiz_statistic_ref.quiz_id = wp_wp_pro_quiz_master.id) LEFT JOIN wp_wp_pro_quiz_statistic ON wp_wp_pro_quiz_statistic_ref.statistic_ref_id = wp_wp_pro_quiz_statistic.statistic_ref_id WHERE wp_wp_pro_quiz_master.name LIKE ‘%language arts%’ AND wp_wp_pro_quiz_statistic_ref.user_id = ‘<?php $_GET[ID] ?>’ AND FROM_UNIXTIME(wp_wp_pro_quiz_statistic_ref.create_time) BETWEEN ‘2015-07-01’ AND ‘2016-06-30’ GROUP BY wp_wp_pro_quiz_statistic_ref.create_time;