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

di Rick Jerz -
Numero di risposte: 0
Immagine Particularly helpful Moodlers Immagine 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%"