bug: bookcount.pl pulls wrong title. Problem is sql joins on wrong columns

the sql seems to assume that biblionumber and biblioitemnumber are always the same, which in my case they aren't.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Michael Hafen 2008-08-22 11:12:47 -06:00 committed by Galen Charlton
parent fe04cf015e
commit c1c49472f4

View file

@ -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 ";
}