From 76b5129236a922f24f393b219dc73b706347e9a7 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Mon, 18 Nov 2019 12:30:27 +0000 Subject: [PATCH] Bug 23916: (follow-up) Fix column name collision Seems that joining 'borrowers' into the query run in C4::Members::GetAllIssues caused a column name collision, which blatted the retrieval of issues.branchcode. So we now are being a bit more specific in what is coming from where in the query. Signed-off-by: Ben Veasey Signed-off-by: Bouzid Fergani --- C4/Members.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 1d47f5dc07..54a457950f 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -273,7 +273,7 @@ sub GetAllIssues { my $dbh = C4::Context->dbh; my $query = -'SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp +'SELECT issues.*, items.*, biblio.*, biblioitems.*, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp,borrowers.firstname,borrowers.surname FROM issues LEFT JOIN items on items.itemnumber=issues.itemnumber LEFT JOIN borrowers on borrowers.borrowernumber=issues.issuer @@ -281,7 +281,7 @@ sub GetAllIssues { LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber WHERE issues.borrowernumber=? UNION ALL - SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp + SELECT old_issues.*, items.*, biblio.*, biblioitems.*, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp,borrowers.firstname,borrowers.surname FROM old_issues LEFT JOIN items on items.itemnumber=old_issues.itemnumber LEFT JOIN borrowers on borrowers.borrowernumber=old_issues.issuer -- 2.11.0