[Koha-patches] [PATCH] bug: bookcount.pl pulls wrong title. Problem is sql joins on wrong columns
Michael Hafen
mdhafen at tech.washk12.org
Fri Aug 22 19:12:47 CEST 2008
the sql seems to assume that biblionumber and biblioitemnumber are always the same, which in my case they aren't.
---
C4/Biblio.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 4e4dcc9..f80a965 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -539,7 +539,7 @@ sub GetBiblioItemData {
my ($biblioitemnumber) = @_;
my $dbh = C4::Context->dbh;
my $query = "SELECT *,biblioitems.notes AS bnotes
- FROM biblio LEFT JOIN biblioitems on biblio.biblionumber=biblioitems.biblioitemnumber ";
+ FROM biblio LEFT JOIN biblioitems on biblio.biblionumber=biblioitems.biblionumber ";
unless(C4::Context->preference('item-level_itypes')) {
$query .= "LEFT JOIN itemtypes on biblioitems.itemtype=itemtypes.itemtype ";
}
--
1.5.4.3
More information about the Koha-patches
mailing list