[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.25,1.26
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.25,1.26 |
Date: |
Sat, 05 Oct 2002 16:58:23 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv17751
Modified Files:
Acquisitions.pm
Log Message:
Replaced several prepare()/execute()/finish() sequences with do().
Index: Acquisitions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisitions.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** Acquisitions.pm 5 Oct 2002 09:48:26 -0000 1.25
--- Acquisitions.pm 5 Oct 2002 23:58:21 -0000 1.26
***************
*** 665,683 ****
$sth->finish;
- # FIXME - Use $dbh->do();
- $query = "insert into biblio set
- biblionumber = $bibnum,
- title = $biblio->{'title'},
- author = $biblio->{'author'},
- copyrightdate = $biblio->{'copyright'},
- serial = $series,
- seriestitle = $biblio->{'seriestitle'},
- notes = $biblio->{'notes'},
- abstract = $biblio->{'abstract'}";
! $sth = $dbh->prepare($query);
! $sth->execute;
- $sth->finish;
return($bibnum);
}
--- 665,681 ----
$sth->finish;
! $dbh->do(<<EOT);
! INSERT INTO biblio
! SET biblionumber = $bibnum,
! title = $biblio->{'title'},
! author = $biblio->{'author'},
! copyrightdate = $biblio->{'copyright'},
! serial = $series,
! seriestitle = $biblio->{'seriestitle'},
! notes = $biblio->{'notes'},
! abstract = $biblio->{'abstract'}
! EOT
return($bibnum);
}
***************
*** 834,838 ****
my ($biblioitem) = @_;
my $dbh = C4::Context->dbh;
- my $query;
# FIXME -
--- 832,835 ----
***************
*** 856,877 ****
$biblioitem->{'place'} = $dbh->quote($biblioitem->{'place'});
! $query = "Update biblioitems set
! itemtype = $biblioitem->{'itemtype'},
! url = $biblioitem->{'url'},
! isbn = $biblioitem->{'isbn'},
! publishercode = $biblioitem->{'publishercode'},
! publicationyear = $biblioitem->{'publicationyear'},
! classification = $biblioitem->{'classification'},
! dewey = $biblioitem->{'dewey'},
! subclass = $biblioitem->{'subclass'},
! illus = $biblioitem->{'illus'},
! pages = $biblioitem->{'pages'},
! volumeddesc = $biblioitem->{'volumeddesc'},
! notes = $biblioitem->{'notes'},
! size = $biblioitem->{'size'},
! place = $biblioitem->{'place'}
! where biblioitemnumber = $biblioitem->{'biblioitemnumber'}";
!
! $dbh->do($query);
} # sub modbibitem
--- 853,874 ----
$biblioitem->{'place'} = $dbh->quote($biblioitem->{'place'});
! $dbh->do(<<EOT);
! UPDATE biblioitems
! SET itemtype = $biblioitem->{'itemtype'},
! url = $biblioitem->{'url'},
! isbn = $biblioitem->{'isbn'},
! publishercode = $biblioitem->{'publishercode'},
! publicationyear = $biblioitem->{'publicationyear'},
! classification = $biblioitem->{'classification'},
! dewey = $biblioitem->{'dewey'},
! subclass = $biblioitem->{'subclass'},
! illus = $biblioitem->{'illus'},
! pages = $biblioitem->{'pages'},
! volumeddesc = $biblioitem->{'volumeddesc'},
! notes = $biblioitem->{'notes'},
! size = $biblioitem->{'size'},
! place = $biblioitem->{'place'}
! WHERE biblioitemnumber = $biblioitem->{'biblioitemnumber'}
! EOT
} # sub modbibitem
***************
*** 882,891 ****
my ($bibitemnum,$note)address@hidden;
my $dbh = C4::Context->dbh;
! # FIXME - Use $dbh->do();
! my $query="update biblioitems set notes='$note' where
! biblioitemnumber='$bibitemnum'";
! my $sth=$dbh->prepare($query);
! $sth->execute;
! $sth->finish;
}
--- 879,888 ----
my ($bibitemnum,$note)address@hidden;
my $dbh = C4::Context->dbh;
!
! $dbh->do(<<EOT);
! UPDATE biblioitems
! SET notes = '$note'
! WHERE biblioitemnumber = '$bibitemnum'
! EOT
}
***************
*** 1592,1598 ****
$dbh->do($query);
! $query = "Delete from biblioitems
! where biblioitemnumber = $biblioitemnumber";
! $dbh->do($query);
} # if
--- 1589,1596 ----
$dbh->do($query);
! $dbh->do(<<EOT);
! DELETE FROM biblioitems
! WHERE biblioitemnumber = $biblioitemnumber
! EOT
} # if
***************
*** 1618,1625 ****
} # while
! $sth->finish;
! $query = "Delete from items where biblioitemnumber = $biblioitemnumber";
! $dbh->do($query);
} # sub deletebiblioitem
--- 1616,1625 ----
} # while
! $sth->finish; # FIXME - This is bogus, isn't it?
! $dbh->do(<<EOT);
! DELETE FROM items
! WHERE biblioitemnumber = $biblioitemnumber
! EOT
} # sub deletebiblioitem
***************
*** 1864,1868 ****
my ($website) = @_;
my $dbh = C4::Context->dbh;
- my $query;
$website->{'biblionumber'} = $dbh->quote($website->{'biblionumber'});
--- 1864,1867 ----
***************
*** 1871,1881 ****
$website->{'url'} = $dbh->quote($website->{'url'});
! $query = "Insert into websites set
! biblionumber = $website->{'biblionumber'},
! title = $website->{'title'},
! description = $website->{'description'},
! url = $website->{'url'}";
!
! $dbh->do($query);
} # sub website
--- 1870,1880 ----
$website->{'url'} = $dbh->quote($website->{'url'});
! $dbh->do(<<EOT);
! INSERT INTO websites
! SET biblionumber = $website->{'biblionumber'},
! title = $website->{'title'},
! description = $website->{'description'},
! url = $website->{'url'}
! EOT
} # sub website
***************
*** 1895,1899 ****
my ($website) = @_;
my $dbh = C4::Context->dbh;
- my $query;
$website->{'title'} = $dbh->quote($website->{'title'});
--- 1894,1897 ----
***************
*** 1901,1911 ****
$website->{'url'} = $dbh->quote($website->{'url'});
! $query = "Update websites set
! title = $website->{'title'},
! description = $website->{'description'},
! url = $website->{'url'}
! where websitenumber = $website->{'websitenumber'}";
!
! $dbh->do($query);
} # sub updatewebsite
--- 1899,1909 ----
$website->{'url'} = $dbh->quote($website->{'url'});
! $dbh->do(<<EOT);
! UPDATE websites
! SET title = $website->{'title'},
! description = $website->{'description'},
! url = $website->{'url'}
! where websitenumber = $website->{'websitenumber'}
! EOT
} # sub updatewebsite
***************
*** 1922,1932 ****
my ($websitenumber) = @_;
my $dbh = C4::Context->dbh;
! # FIXME - $query is unnecessary: just use
! # $dbh->do(<<EOT);
! # DELETE FROM websites where websitenumber=$websitenumber
! # EOT
! my $query = "Delete from websites where websitenumber = $websitenumber";
!
! $dbh->do($query);
} # sub deletewebsite
--- 1920,1928 ----
my ($websitenumber) = @_;
my $dbh = C4::Context->dbh;
!
! $dbh->do(<<EOT);
! DELETE FROM websites
! WHERE websitenumber = $websitenumber
! EOT
} # sub deletewebsite
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.25,1.26,
Andrew Arensburger <=