LMSouq
moodle-core Open

Moodle join tables without raw SQL query

BA
Bahriddin Abdiev
1 month ago
3 views
Problem Description
I am new to the Moodle world. I want to make inner join 2 or more tables with PDO. I checked [documentation][1] but can't find anything helpful. Maybe I am missing some part of Moodle. Let's say I want to get all users enrolled to the specified course. Is there any way to make something similar to this: $users = get_records(['course', 'user'], 'course.id = user.course_id'); [1]: https://docs.moodle.org/dev/Data_manipulation_API#Main_info

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base