Bug 28524: Escape 'rank' in cat_issues_top.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 16 Jun 2021 12:51:08 +0000 (14:51 +0200)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Thu, 22 Jul 2021 07:47:35 +0000 (07:47 +0000)
commit142437b31c90a8b475525f46cef60d9d8f65af8e
treeba5fb00f88976451484de4b78cdf9b60a5396662
parent0df4e6c505af74afd8dd0bf89bd5509cace7c7e5
Bug 28524: Escape 'rank' in cat_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 > Most-circulated items
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, biblio.biblionumber AS ID, itemcallnumber as CALLNUM,
  ccode as CCODE, loca' at line 1

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>
(cherry picked from commit ea214856d112e262f2ab7df223b6ab9bf673ee67)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit f27cfd734b78c947e60e5603f19055a9204b0ba3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 8d7f065c03ac9085185fabf582dd74cc35ce9ce8)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 8d7f065c03ac9085185fabf582dd74cc35ce9ce8)
reports/cat_issues_top.pl