Directly Querying Moodle's database

Directly Querying Moodle's database

by Ricardo Godinho -
Number of replies: 1

What are the advantages/disadvantages of querying moodle's database directly, when running a script? the script has to search/compare usernames between moodle and an external source. Around 25 k records.

Average of ratings: -
In reply to Ricardo Godinho

Re: Directly Querying Moodle's database

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The advantage is the direct DB access is the fastest possible way to do this.

The disadvantage is that you have to know what the data in the Moodle database means. Also, if the Moodle DB structure ever changes it will break your script until you fix it.

Average of ratings: Useful (1)