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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to