[Koha-devel] CVS: koha/C4 Search.pm,1.7,1.8
Chris Cormack
rangi at users.sourceforge.net
Sun Nov 25 16:42:03 CET 2001
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv14012
Modified Files:
Search.pm
Log Message:
Added a findguarantor routine to search for the guarantor of a given borrower.
Probably it and findgurantees need to moved out to borrowers.pm
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Search.pm 2001/11/25 22:25:55 1.7
--- Search.pm 2001/11/26 00:41:34 1.8
***************
*** 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! ],
***************
*** 72,76 ****
return($i,\@dat);
}
!
sub systemprefs {
--- 73,94 ----
return($i,\@dat);
}
! sub findguarantor{
! my ($bornum)=@_;
! 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 systemprefs {
More information about the Koha-devel
mailing list