Lines 67-73
BEGIN {
Link Here
|
67 |
push @EXPORT, qw( |
67 |
push @EXPORT, qw( |
68 |
GetBiblioData |
68 |
GetBiblioData |
69 |
GetMarcBiblio |
69 |
GetMarcBiblio |
70 |
GetBiblioItemData |
|
|
71 |
|
70 |
|
72 |
&GetRecordValue |
71 |
&GetRecordValue |
73 |
|
72 |
|
Lines 720-753
sub GetBiblioData {
Link Here
|
720 |
return ($data); |
719 |
return ($data); |
721 |
} # sub GetBiblioData |
720 |
} # sub GetBiblioData |
722 |
|
721 |
|
723 |
=head2 GetBiblioItemData |
|
|
724 |
|
725 |
$itemdata = &GetBiblioItemData($biblioitemnumber); |
726 |
|
727 |
Looks up the biblioitem with the given biblioitemnumber. Returns a |
728 |
reference-to-hash. The keys are the fields from the C<biblio>, |
729 |
C<biblioitems>, and C<itemtypes> tables in the Koha database, except |
730 |
that C<biblioitems.notes> is given as C<$itemdata-E<gt>{bnotes}>. |
731 |
|
732 |
=cut |
733 |
|
734 |
sub GetBiblioItemData { |
735 |
my ($biblioitemnumber) = @_; |
736 |
my $dbh = C4::Context->dbh; |
737 |
my $query = "SELECT *,biblioitems.notes AS bnotes |
738 |
FROM biblio LEFT JOIN biblioitems on biblio.biblionumber=biblioitems.biblionumber "; |
739 |
unless ( C4::Context->preference('item-level_itypes') ) { |
740 |
$query .= "LEFT JOIN itemtypes on biblioitems.itemtype=itemtypes.itemtype "; |
741 |
} |
742 |
$query .= " WHERE biblioitemnumber = ? "; |
743 |
my $sth = $dbh->prepare($query); |
744 |
my $data; |
745 |
$sth->execute($biblioitemnumber); |
746 |
$data = $sth->fetchrow_hashref; |
747 |
$sth->finish; |
748 |
return ($data); |
749 |
} # sub &GetBiblioItemData |
750 |
|
751 |
=head2 GetISBDView |
722 |
=head2 GetISBDView |
752 |
|
723 |
|
753 |
$isbd = &GetISBDView({ |
724 |
$isbd = &GetISBDView({ |
754 |
- |
|
|