LMSouq
moodle-core Open

Get the count from the sql query in moodle

US
user200
1 month ago
3 views
Problem Description
I am trying to fetch the number of rows for a query using a Moodle function. This is what I have done so far: $records = $DB->get_records_sql("select * from {user} where maildigest=$login_id"); How do I get the number of results?

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