SQL query to get course id based on the module topic, activities and content inside it

Re: SQL query to get course id based on the module topic, activities and content inside it

by Rick Jerz -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Testers

A lot depends upon what you are looking for.

If you look at the tables in your Moodle database, you will see that a lot of them (oh, maybe 10 or so, see graphic) start with "prefix_course."  You should explore these tables to see which ones contain the words that you are interested in.

In SQL, pattern matching can be done with the "like" comparison operator.  For example:

SELECT * FROM mdl_course

where fullname like "%MBA%"