Users connection by category

Re: Users connection by category

by David Saylor -
Number of replies: 0
The error shown is coming from the comment "#, mdl_course_categories AS cats". The validation looks for explicit table prefixes and prevents them. If you delete from # to the end of the line, it should at least execute.

The where statement doesn't seem to help you unless you have specific requirements you haven't mentioned.

You'll also want to add an ORDER BY that references the category name if you want them ordered by categories.

To restrict by the dates, I would probably recommend joining the user_enrolments table to get their enrolment timestart and timeend to grab only the ones in that range.