I am trying to figure out why $DB->get_records() returns only one row (without having to debug the internal workings of Moodle) when there are multiple rows to be returned. Looks like I will have to set up a test bed where I can do this sort of thing which will take me additional hours to set up another website, database, etc. I was hoping that someone might know what could interfere with Moodle selecting ALL records in a table matching an ID being passed.
The table I'm selecting from is a view. Could that be a problem? I named the view with "mdl_" preface so it should work and all other $DB calls work for that view so I assumed that using a view would be okay for this one module I'm working on.
Additionally I changed my code so that instead of calling $DB->get_records() I call $DB->get_records_sql() instead. Still I only get one row. There should be more.
Lastly, in order to determine if there was some sort of Mysql error, when I run the same query in SqlYog, I get multiple rows so I know the problem lies in Moodle code.