koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Biblio.pm,1.73,1.74


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Biblio.pm,1.73,1.74
Date: Fri, 28 Nov 2003 01:48:36 -0800

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]