moodle-block_configurablereports
moodle-block_configurablereports copied to clipboard
sql "order by" misfunction
When I try to have a "ORDER BY"-statement in my sql-report, it does not work properley. All user Fieldes as User.lastame, user.firsname, user.city, user department and so on are only sorted by the first mentioned field. Whatever is used in "ORDER BY"-clause is ignored.
Hi @fliegerrollo !
Thanks for reporting this issue! It's also happening with Postgres. I've been able to reproduce it using the following SQL:
SELECT u.username, u.city
FROM prefix_user u
ORDER BY u.city
As a workaround, if you disable the "Enable JavaScript ordering" option, the order by works.
I've put it on the backlog.
In the meantime feel free to help us work on this issue. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.