get_records_sql always returns same id for users

Re: get_records_sql always returns same id for users

by Howard Miller -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yeh - the database abstraction library relies on a unique 'id' field being returned. This makes 'SELECT * ... JOIN ... JOIN ... JOIN ...' and the like a bit risky as there will be multiple id fields to choose from. It's always better to be explicit. Only use 'SELECT *' when it's a single table. 

If the tables are large, it may not scale very well either. 

Average of ratings: Useful (1)