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)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Jul 2021 16:29:15 +0000 (12:29 -0400)
commit3a3537fd9333636aa0e52b06447ad3f74798dace
tree0caef3ebdab71b56b763d7d287141afd6fd5e72a
parent87f635ce9f9a1e3fb016aea21c7e5951e09acb2f
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
reports/bor_issues_top.pl