[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] CVS: koha/C4 Search.pm,1.3,1.4
From: |
Chris Cormack |
Subject: |
[Koha-devel] CVS: koha/C4 Search.pm,1.3,1.4 |
Date: |
Mon Sep 10 16:38:02 2001 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv3802/C4
Modified Files:
Search.pm
Log Message:
Fixing a glitch that was showing the biblio notes field where the
biblioitems notes should have been displaying
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Search.pm 2001/06/20 03:36:01 1.3
--- Search.pm 2001/09/10 23:37:09 1.4
***************
*** 20,24 ****
&OpacSearch &borrdata2 &NewBorrowerNumber &bibitemdata &borrissues
&getboracctrecord &ItemType &itemissues &FrontSearch &subject &subtitle
! &addauthor &bibitems &barcodes &findguarantees &allissues &systemprefs);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
--- 20,25 ----
&OpacSearch &borrdata2 &NewBorrowerNumber &bibitemdata &borrissues
&getboracctrecord &ItemType &itemissues &FrontSearch &subject &subtitle
! &addauthor &bibitems &barcodes &findguarantees &allissues &systemprefs
! &findguarantor);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
***************
*** 73,76 ****
--- 74,95 ----
}
+ sub findguarantor{
+ my ($bornum)address@hidden;
+ my $dbh=C4Connect;
+ my $query="select guarantor from borrowers where
+ borrowernumber='$bornum'";
+ my $sth=$dbh->prepare($query);
+ $sth->execute;
+ my $data=$sth->fetchrow_hashref;
+ $sth->finish;
+ $query="Select * from borrowers where
borrowernumber='$data->{'guarantor'}'";
+ $sth=$dbh->prepare($query);
+ $sth->execute;
+ $data=$sth->fetchrow_hashref;
+ $sth->finish;
+ $dbh->disconnect;
+ return($data);
+ }
+
sub NewBorrowerNumber {
my $dbh=C4Connect;
***************
*** 215,221 ****
my $i=1;
my @results;
! my $query ="Select * from biblio,bibliosubtitle,biblioitems where
! biblio.biblionumber=bibliosubtitle.biblionumber and
! biblioitems.biblionumber=biblio.biblionumber and
(((title like '$key[0]%' or title like '% $key[0]%')";
while ($i < $count){
--- 234,243 ----
my $i=1;
my @results;
! my $query ="Select * from biblio
! left join bibliosubtitle on
! bibliosubtitle.biblionumber=biblio.biblionumber
! left join biblioitems on
! biblioitems.biblionumber=biblio.biblionumber
! where
(((title like '$key[0]%' or title like '% $key[0]%')";
while ($i < $count){
***************
*** 345,353 ****
my $i=1;
$query="select *,biblio.author,biblio.biblionumber from
! biblioitems,biblio
left join additionalauthors
on additionalauthors.biblionumber =biblio.biblionumber
! where biblioitems.biblionumber=biblio.biblionumber
! and
((biblio.author like '$key[0]%' or biblio.author like '% $key[0]%' or
additionalauthors.author like '$key[0]%' or additionalauthors.author
--- 367,375 ----
my $i=1;
$query="select *,biblio.author,biblio.biblionumber from
! biblio
left join additionalauthors
on additionalauthors.biblionumber =biblio.biblionumber
! left join biblioitems on biblioitems.biblionumber=biblio.biblionumber
! where
((biblio.author like '$key[0]%' or biblio.author like '% $key[0]%' or
additionalauthors.author like '$key[0]%' or additionalauthors.author
***************
*** 397,404 ****
my address@hidden;
my $i=1;
! $query="select * from biblio,bibliosubtitle,biblioitems
where
- (biblio.biblionumber=bibliosubtitle.biblionumber and
- biblioitems.biblionumber=biblio.biblionumber) and
(((title like '$key[0]%' or title like '% $key[0]%' or title like
'% $key[0]')";
while ($i<$count){
--- 419,427 ----
my address@hidden;
my $i=1;
! $query="select * from biblio
! left join bibliosubtitle on
! bibliosubtitle.biblionumber=biblio.biblionumber
! left join biblioitems on
biblioitems.biblionumber=biblio.biblionumber
where
(((title like '$key[0]%' or title like '% $key[0]%' or title like
'% $key[0]')";
while ($i<$count){
***************
*** 714,718 ****
my ($bibitem)address@hidden;
my $dbh=C4Connect;
! my $query="Select * from biblio,biblioitems,itemtypes where
biblio.biblionumber=
biblioitems.biblionumber and biblioitemnumber=$bibitem and
biblioitems.itemtype=itemtypes.itemtype";
--- 737,742 ----
my ($bibitem)address@hidden;
my $dbh=C4Connect;
! my $query="Select *, biblioitems.notes as bnotes
! from biblio,biblioitems,itemtypes where biblio.biblionumber=
biblioitems.biblionumber and biblioitemnumber=$bibitem and
biblioitems.itemtype=itemtypes.itemtype";
***************
*** 1043,1048 ****
biblionumber=$bibnum ";
if ($type eq 'opac'){
! $query.=" and (itemlost <>1 or itemlost is NULL) and
! (wthdrawn <> 1 or wthdrawn is NULL)";
}
my $sth=$dbh->prepare($query);
--- 1067,1072 ----
biblionumber=$bibnum ";
if ($type eq 'opac'){
! $query.=" and (itemlost =0 or itemlost is NULL) and
! (wthdrawn = 0 or wthdrawn is NULL)";
}
my $sth=$dbh->prepare($query);
***************
*** 1078,1082 ****
$scount++;
}
! if ($data->{'itemlost'} eq '1'){
$lostcount++;
}
--- 1102,1106 ----
$scount++;
}
! if ($data->{'itemlost'} eq '1' || $data->{'itemlost'} eq '2'){
$lostcount++;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-devel] CVS: koha/C4 Search.pm,1.3,1.4,
Chris Cormack <=
- Prev by Date:
[Koha-devel] CVS: koha moredetail.pl,1.2,1.3 modbibitem.pl,1.1.1.1,1.2
- Next by Date:
[Koha-devel] CVS: koha deletemem.pl,1.1,1.2
- Previous by thread:
[Koha-devel] CVS: koha moredetail.pl,1.2,1.3 modbibitem.pl,1.1.1.1,1.2
- Next by thread:
[Koha-devel] CVS: koha deletemem.pl,1.1,1.2
- Index(es):