From cc35b709e1cd53fbca4ecc2cfe0d85b7c53474c9 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 1 Apr 2003 13:19:55 +0000 Subject: [PATCH] small fix to avoid empty list when itemtypes does'nt exist in DB --- C4/Search.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 0c82632969..2a0f825c70 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1231,10 +1231,9 @@ If this is set, it is set to C. sub ItemInfo { my ($env,$biblionumber,$type) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM items, biblio, biblioitems, itemtypes + my $query = "SELECT * FROM items, biblio, biblioitems left join itemtypes on biblioitems.itemtype = itemtypes.itemtype WHERE items.biblionumber = ? AND biblioitems.biblioitemnumber = items.biblioitemnumber - AND biblioitems.itemtype = itemtypes.itemtype AND biblio.biblionumber = items.biblionumber"; if ($type ne 'intra'){ $query .= " and ((items.itemlost<>1 and items.itemlost <> 2) -- 2.39.5