[Koha-cvs] CVS: koha/C4 Biblio.pm,1.73,1.74
Paul POULAIN
tipaul at users.sourceforge.net
Fri Nov 28 10:48:36 CET 2003
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv5835/C4
Modified Files:
Biblio.pm
Log Message:
bugfix : misusing prepare & execute => now using prepare(?) and execute($var)
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -r1.73 -r1.74
*** Biblio.pm 28 Nov 2003 09:45:25 -0000 1.73
--- Biblio.pm 28 Nov 2003 09:48:33 -0000 1.74
***************
*** 1266,1272 ****
$subject[$i] =~ s/^ //g;
$subject[$i] =~ s/ $//g;
! my $query = "select * from catalogueentry where entrytype = 's' and catalogueentry = '$subject[$i]'";
my $sth = $dbh->prepare($query);
! $sth->execute;
if (my $data = $sth->fetchrow_hashref) {
--- 1266,1272 ----
$subject[$i] =~ s/^ //g;
$subject[$i] =~ s/ $//g;
! my $query = "select * from catalogueentry where entrytype = 's' and catalogueentry = ?";
my $sth = $dbh->prepare($query);
! $sth->execute($subject[$i]);
if (my $data = $sth->fetchrow_hashref) {
***************
*** 1275,1289 ****
# subject not in aut, chosen to force anway
# so insert into cataloguentry so its in auth file
! $query = "Insert into catalogueentry (entrytype,catalogueentry) values ('s','$subject[$i]')";
my $sth2 = $dbh->prepare($query);
! $sth2->execute;
$sth2->finish;
} else {
$error = "$subject[$i]\n does not exist in the subject authority file";
! $query = "Select * from catalogueentry where entrytype = 's' and (catalogueentry like '$subject[$i] %'
! or catalogueentry like '% $subject[$i] %' or catalogueentry like '% $subject[$i]')";
my $sth2 = $dbh->prepare($query);
! $sth2->execute;
while (my $data = $sth2->fetchrow_hashref) {
$error .= "<br>$data->{'catalogueentry'}";
--- 1275,1289 ----
# subject not in aut, chosen to force anway
# so insert into cataloguentry so its in auth file
! $query = "Insert into catalogueentry (entrytype,catalogueentry) values ('s',?)";
my $sth2 = $dbh->prepare($query);
! $sth2->execute($subject[$i]);
$sth2->finish;
} else {
$error = "$subject[$i]\n does not exist in the subject authority file";
! $query = "Select * from catalogueentry where entrytype = 's' and (catalogueentry like ?
! or catalogueentry like ? or catalogueentry like ?)";
my $sth2 = $dbh->prepare($query);
! $sth2->execute("$subject[$i] %","% $subject[$i] %","% $subject[$i]");
while (my $data = $sth2->fetchrow_hashref) {
$error .= "<br>$data->{'catalogueentry'}";
***************
*** 1295,1301 ****
} # else
if ($error eq '') {
! my $query = "Delete from bibliosubject where biblionumber = $bibnum";
my $sth = $dbh->prepare($query);
! $sth->execute;
$sth->finish;
$sth = $dbh->prepare("Insert into bibliosubject values (?,?)");
--- 1295,1301 ----
} # else
if ($error eq '') {
! my $query = "Delete from bibliosubject where biblionumber = ?";
my $sth = $dbh->prepare($query);
! $sth->execute($bibnum);
$sth->finish;
$sth = $dbh->prepare("Insert into bibliosubject values (?,?)");
***************
*** 2218,2221 ****
--- 2218,2224 ----
# $Id$
# $Log$
+ # Revision 1.74 2003/11/28 09:48:33 tipaul
+ # bugfix : misusing prepare & execute => now using prepare(?) and execute($var)
+ #
# Revision 1.73 2003/11/28 09:45:25 tipaul
# bugfix for iso2709 file import in the "notforloan" field.
More information about the Koha-cvs
mailing list