koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/admin itemtypes.pl,1.10,1.10.2.1


From: MJ Ray
Subject: [Koha-cvs] CVS: koha/admin itemtypes.pl,1.10,1.10.2.1
Date: Tue, 23 Dec 2003 09:58:06 -0800

Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv22941/admin

Modified Files:
      Tag: rel_2_0
        itemtypes.pl 
Log Message:
DBI call fix for bug 662

Index: itemtypes.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/itemtypes.pl,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C2 -r1.10 -r1.10.2.1
*** itemtypes.pl        18 Jul 2003 13:34:14 -0000      1.10
--- itemtypes.pl        23 Dec 2003 17:58:04 -0000      1.10.2.1
***************
*** 54,69 ****
        my @data=split(' ',$searchstring);
        my address@hidden;
!       my $query="Select * from itemtypes where (description like 
\"$data[0]%\") order by itemtype";
!       my $sth=$dbh->prepare($query);
!       $sth->execute;
        my @results;
-       my $cnt=0;
        while (my $data=$sth->fetchrow_hashref){
        push(@results,$data);
-       $cnt ++;
        }
        #  $sth->execute;
        $sth->finish;
!       return ($cnt,address@hidden);
  }
  
--- 54,66 ----
        my @data=split(' ',$searchstring);
        my address@hidden;
!       my $sth=$dbh->prepare("Select * from itemtypes where (description like 
?) order by itemtype");
!       $sth->execute("$data[0]%");
        my @results;
        while (my $data=$sth->fetchrow_hashref){
        push(@results,$data);
        }
        #  $sth->execute;
        $sth->finish;
!       return (scalar(@results),address@hidden);
  }
  
***************
*** 100,105 ****
        if ($itemtype) {
                my $dbh = C4::Context->dbh;
!               my $sth=$dbh->prepare("select 
itemtype,description,loanlength,renewalsallowed,rentalcharge from itemtypes 
where itemtype='$itemtype'");
!               $sth->execute;
                $data=$sth->fetchrow_hashref;
                $sth->finish;
--- 97,102 ----
        if ($itemtype) {
                my $dbh = C4::Context->dbh;
!               my $sth=$dbh->prepare("select 
itemtype,description,loanlength,renewalsallowed,rentalcharge from itemtypes 
where itemtype=?");
!               $sth->execute($itemtype);
                $data=$sth->fetchrow_hashref;
                $sth->finish;
***************
*** 165,171 ****
        my $dbh = C4::Context->dbh;
        my $itemtype=uc($input->param('itemtype'));
!       my $query = "delete from itemtypes where itemtype='$itemtype'";
!       my $sth=$dbh->prepare($query);
!       $sth->execute;
        $sth->finish;
        print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; 
URL=itemtypes.pl\"></html>";
--- 162,167 ----
        my $dbh = C4::Context->dbh;
        my $itemtype=uc($input->param('itemtype'));
!       my $sth=$dbh->prepare("delete from itemtypes where itemtype=?");
!       $sth->execute($itemtype);
        $sth->finish;
        print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; 
URL=itemtypes.pl\"></html>";




reply via email to

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