Bug 28523: Escape 'rank' in bor_issues_top.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 16 Jun 2021 12:54:47 +0000 (14:54 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Jul 2021 08:12:56 +0000 (10:12 +0200)
commit7d795fcf5f72e105667eb21e671fb1a63db8383b
tree0111f58511cf4c0abc7f55287f7f755eae2886b5
parentdca25b9dcea4823a7fb7bb9a1f4ca83aa09c9fc1
Bug 28523: Escape 'rank' in bor_issues_top.pl

It's a MySQL 8 keyword

Test plan:
Turn off strict_sql_modes (there are other problems in this script)
Hit Home Reports > Patrons with the most checkouts
Submit the form

Without this patch you got:
    You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to
    use near 'RANK, borrowers.borrowernumber AS ID FROM `old_issues`

With this patch applied you see the report result view

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
reports/bor_issues_top.pl