[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.16,1.17
From: |
Gynn Lomax |
Subject: |
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.16,1.17 |
Date: |
Wed, 22 May 2002 11:35:27 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv2531/C4
Modified Files:
Acquisitions.pm
Log Message:
Update to acqui.simple system. Hopefully this is a lot more user friendly.
Probably a few bug fixes to come still.
Index: Acquisitions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisitions.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Acquisitions.pm 21 May 2002 06:19:48 -0000 1.16
--- Acquisitions.pm 22 May 2002 18:35:25 -0000 1.17
***************
*** 19,23 ****
&getallorders &getrecorders &updatecurrencies &getorder &getcurrency
&updaterecorder
&updatecost &checkitems &modnote &getitemtypes &getbiblio
! &getbiblioitem &getitemsbybiblioitem &isbnsearch &keywordsearch
&websitesearch &addwebsite &updatewebsite &deletewebsite);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
--- 19,24 ----
&getallorders &getrecorders &updatecurrencies &getorder &getcurrency
&updaterecorder
&updatecost &checkitems &modnote &getitemtypes &getbiblio
! &getbiblioitembybiblionumber
! &getbiblioitem &getitemsbybiblioitem &isbnsearch
&websitesearch &addwebsite &updatewebsite &deletewebsite);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
***************
*** 960,963 ****
--- 961,965 ----
foreach my $barcode (@barcodes) {
$barcode = uc($barcode);
+ $barcode = $dbh->quote($barcode);
$query = "Insert into items set
itemnumber = $itemnumber,
***************
*** 1202,1205 ****
--- 1204,1208 ----
}
+
sub getitemtypes {
my $dbh = C4Connect;
***************
*** 1267,1270 ****
--- 1270,1295 ----
+ sub getbiblioitembybiblionumber {
+ my ($biblionumber) = @_;
+ my $dbh = C4Connect;
+ my $query = "Select * from biblioitems where biblionumber =
+ $biblionumber";
+ my $sth = $dbh->prepare($query);
+ my $count = 0;
+ my @results;
+
+ $sth->execute;
+
+ while (my $data = $sth->fetchrow_hashref) {
+ $results[$count] = $data;
+ $count++;
+ } # while
+
+ $sth->finish;
+ $dbh->disconnect;
+ return($count, @results);
+ } # sub
+
+
sub getitemsbybiblioitem {
my ($biblioitemnum) = @_;
***************
*** 1300,1304 ****
$isbn = $dbh->quote($isbn);
! $query = "Select * from biblioitems where isbn = $isbn";
$sth = $dbh->prepare($query);
--- 1325,1331 ----
$isbn = $dbh->quote($isbn);
! $query = "Select biblio.* from biblio, biblioitems where
! biblio.biblionumber = biblioitems.biblionumber
! and isbn = $isbn";
$sth = $dbh->prepare($query);
***************
*** 1313,1360 ****
return($count, @results);
} # sub isbnsearch
-
-
- sub keywordsearch {
- my ($keywordlist) = @_;
- my $dbh = C4Connect;
- my $query = "Select * from biblio where";
- my $count = 0;
- my $sth;
- my @results;
- my @keywords = split(/ +/, $keywordlist);
- my $keyword = shift(@keywords);
-
- $keyword =~ s/%/\\%/g;
- $keyword =~ s/_/\\_/;
- $keyword = "%" . $keyword . "%";
- $keyword = $dbh->quote($keyword);
- $query .= " (author like $keyword) or
- (title like $keyword) or (unititle like $keyword) or
- (notes like $keyword) or (seriestitle like $keyword) or
- (abstract like $keyword)";
-
- foreach $keyword (@keywords) {
- $keyword =~ s/%/\\%/;
- $keyword =~ s/_/\\_/;
- $keyword = "%" . $keyword . "%";
- $keyword = $dbh->quote($keyword);
- $query .= " or (author like $keyword) or
- (title like $keyword) or (unititle like $keyword) or
- (notes like $keyword) or (seriestitle like $keyword) or
- (abstract like $keyword)";
- } # foreach
-
- $sth = $dbh->prepare($query);
- $sth->execute;
-
- while (my $data = $sth->fetchrow_hashref) {
- $results[$count] = $data;
- $count++;
- } # while
-
- $sth->finish;
- $dbh->disconnect;
- return($count, @results);
- } # sub keywordsearch
--- 1340,1343 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.16,1.17,
Gynn Lomax <=
- Prev by Date:
[Koha-cvs] CVS: koha/acqui.simple addbooks.pl,1.8,1.9 additem.pl,1.3,1.4 isbnsearch.pl,1.1,1.2 keywordsearch.pl,1.2,1.3 savebiblio.pl,1.3,1.4 saveitem.pl,1.3,1.4 websitesearch.pl,1.1,1.2 addbiblioitem.pl,1.3,NONE savebiblioitem.pl,1.4,NONE
- Next by Date:
[Koha-cvs] CVS: koha detail.pl,1.8,1.9 moredetail.pl,1.6,1.7
- Previous by thread:
[Koha-cvs] CVS: koha/acqui.simple addbooks.pl,1.8,1.9 additem.pl,1.3,1.4 isbnsearch.pl,1.1,1.2 keywordsearch.pl,1.2,1.3 savebiblio.pl,1.3,1.4 saveitem.pl,1.3,1.4 websitesearch.pl,1.1,1.2 addbiblioitem.pl,1.3,NONE savebiblioitem.pl,1.4,NONE
- Next by thread:
[Koha-cvs] CVS: koha detail.pl,1.8,1.9 moredetail.pl,1.6,1.7
- Index(es):