Filters are not working

Re: Filters are not working

by Randy Thornton -
Number of replies: 0
Picture of Documentation writers

Well, you need to do two things:

Add the items from the SELECT statement that you want to see altogether, so probably you want to add the date statement for the p.timecompleted to the main part so it is a column in the report.

Next you need to add the JOINs in the second query to the first in a way that you get the information from the course_completions table. Your first query already uses the user and course tables. So all you need to add to that is the JOIN for the course_completion table and connection it to the course and user tables. Something like:

JOIN prefix_course_completions AS p ON p.course = c.id AND p.userid = u.id

should do the job.

Of course, the course completion is just that, the date of the completion of the course as set in course completion, not anything else.