[Koha-cvs] CVS: koha/C4 Acquisition.pm,1.10,1.11 Breeding.pm,1.7,1.8
Paul POULAIN
tipaul at users.sourceforge.net
Wed May 4 17:39:22 CEST 2005
- Previous message: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.90,1.91
- Next message: [Koha-cvs] CVS: koha/C4 Auth.pm,1.37,1.38 Auth_with_ldap.pm,1.2,1.3 Biblio.pm,1.117,1.118 Bull.pm,1.8,1.9 Members.pm,1.6,1.7 SearchMarc.pm,1.41,1.42 Search.pm,1.101,1.102 Suggestions.pm,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29180/C4
Modified Files:
Acquisition.pm Breeding.pm
Log Message:
synch'ing 2.2 and head
Index: Acquisition.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisition.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** Acquisition.pm 1 Mar 2005 13:40:48 -0000 1.10
--- Acquisition.pm 4 May 2005 15:39:08 -0000 1.11
***************
*** 398,402 ****
left join borrowers on aqbasket.authorisedby=borrowers.borrowernumber
where booksellerid=? and (quantity > quantityreceived or
! quantityreceived is NULL)
group by basketno order by aqbasket.basketno");
$sth->execute($supplierid);
--- 398,402 ----
left join borrowers on aqbasket.authorisedby=borrowers.borrowernumber
where booksellerid=? and (quantity > quantityreceived or
! quantityreceived is NULL) and datecancellationprinted is NULL
group by basketno order by aqbasket.basketno");
$sth->execute($supplierid);
Index: Breeding.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Breeding.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Breeding.pm 8 Dec 2004 10:11:51 -0000 1.7
--- Breeding.pm 4 May 2005 15:39:08 -0000 1.8
***************
*** 53,57 ****
@ISA = qw(Exporter);
! @EXPORT = qw(&ImportBreeding);
sub ImportBreeding {
--- 53,57 ----
@ISA = qw(Exporter);
! @EXPORT = qw(&ImportBreeding &BreedingSearch);
sub ImportBreeding {
***************
*** 125,127 ****
--- 125,178 ----
}
+
+ =item BreedingSearch
+
+ ($count, @results) = &BreedingSearch($title,$isbn,$random);
+ C<$title> contains the title,
+ C<$isbn> contains isbn or issn,
+ C<$random> contains the random seed from a z3950 search.
+
+ C<$count> is the number of items in C<@results>. C<@results> is an
+ array of references-to-hash; the keys are the items from the C<marc_breeding> table of the Koha database.
+
+ =cut
+
+ sub BreedingSearch {
+ my ($title,$isbn,$z3950random) = @_;
+ my $dbh = C4::Context->dbh;
+ my $count = 0;
+ my ($query, at bind);
+ my $sth;
+ my @results;
+
+ $query = "Select id,file,isbn,title,author from marc_breeding where ";
+ if ($z3950random) {
+ $query .= "z3950random = ?";
+ @bind=($z3950random);
+ } else {
+ @bind=();
+ if ($title) {
+ $query .= "title like ?";
+ push(@bind,"$title%");
+ }
+ if ($title && $isbn) {
+ $query .= " and ";
+ }
+ if ($isbn) {
+ $query .= "isbn like ?";
+ push(@bind,"$isbn%");
+ }
+ }
+ $sth = $dbh->prepare($query);
+ $sth->execute(@bind);
+ while (my $data = $sth->fetchrow_hashref) {
+ $results[$count] = $data;
+ $count++;
+ } # while
+
+ $sth->finish;
+ return($count, @results);
+ } # sub breedingsearch
+
+
END { } # module clean-up code here (global destructor)
- Previous message: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.90,1.91
- Next message: [Koha-cvs] CVS: koha/C4 Auth.pm,1.37,1.38 Auth_with_ldap.pm,1.2,1.3 Biblio.pm,1.117,1.118 Bull.pm,1.8,1.9 Members.pm,1.6,1.7 SearchMarc.pm,1.41,1.42 Search.pm,1.101,1.102 Suggestions.pm,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Koha-cvs
mailing list