[Koha-bugs] [Bug 28523] New: Patrons with the most checkouts (bor_issues_top.pl) is failing with MySQL 8
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 7 23:03:17 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28523
Bug ID: 28523
Summary: Patrons with the most checkouts (bor_issues_top.pl) is
failing with MySQL 8
Change sponsored?: ---
Product: Koha
Version: 21.05
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P5 - low
Component: Reports
Assignee: koha-bugs at lists.koha-community.org
Reporter: development at cm-portimao.pt
QA Contact: testopia at bugs.koha-community.org
CGI::Compile::ROOT::usr_share_koha_intranet_cgi_2dbin_reports_bor_issues_top_2epl::calculate():
DBI Exception: DBD::mysql::st execute failed: 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`
LEFT JO' at line 1 [for Statement "SELECT CONCAT_WS('',
borrowers.surname , ",\t", borrowers.firstname), COUNT(*) AS RANK,
borrowers.borrowernumber AS ID FROM `old_issues`
LEFT JOIN borrowers USING(borrowernumber)
LEFT JOIN items USING(itemnumber)
LEFT JOIN biblioitems USING(biblioitemnumber)
WHERE old_issues.borrowernumber IS NOT NULL
AND old_issues.issuedate > '2021-06-01' AND
old_issues.issuedate < '2021-06-07' GROUP BY borrowers.borrowernumber ORDER BY
RANK DESC LIMIT 5"] at
/usr/share/koha/intranet/cgi-bin/reports/bor_issues_top.pl line 70
Rank is a MySQL reserved word defined in MySQL version 8.0.2
https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-8-0-detailed-R
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list