[Koha-cvs] CVS: koha/C4 Circulation.pm,1.8,1.9

MJ Ray slef at users.sourceforge.net
Wed Dec 3 12:43:14 CET 2003


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv8895/C4

Modified Files:
	Circulation.pm 
Log Message:
DBI fixes as part of bug 662

Index: Circulation.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** Circulation.pm	13 Oct 2002 08:29:47 -0000	1.8
--- Circulation.pm	3 Dec 2003 11:43:12 -0000	1.9
***************
*** 169,183 ****
    my ($env,$dbh,$itemnum)=@_;
    my $resbor = "";
!   my $query = "select * from reserves,items
!   where (items.itemnumber = '$itemnum')
    and (items.biblionumber = reserves.biblionumber)
!   and (reserves.found is null) order by priority";
!   my $sth = $dbh->prepare($query);
!   $sth->execute();
    if (my $data=$sth->fetchrow_hashref) {
      $resbor = $data->{'borrowernumber'};
    }
-   return ($resbor);
    $sth->finish;
  }
  
--- 169,182 ----
    my ($env,$dbh,$itemnum)=@_;
    my $resbor = "";
!   my $sth = $dbh->prepare("select * from reserves,items
!   where (items.itemnumber = ?)
    and (items.biblionumber = reserves.biblionumber)
!   and (reserves.found is null) order by priority");
!   $sth->execute($itemnum);
    if (my $data=$sth->fetchrow_hashref) {
      $resbor = $data->{'borrowernumber'};
    }
    $sth->finish;
+   return ($resbor);
  }
  
***************
*** 186,199 ****
    my ($env,$dbh,$bornum)=@_;
    my @itemswaiting="";
!   my $query = "select * from reserves
!   where (borrowernumber = '$bornum')
!   and (reserves.found='W')";
!   my $sth = $dbh->prepare($query);
!   $sth->execute();
    if (my $data=$sth->fetchrow_hashref) {
      push @itemswaiting,$data->{'itemnumber'};
    }
-   return (\@itemswaiting);
    $sth->finish;
  }
  
--- 185,195 ----
    my ($env,$dbh,$bornum)=@_;
    my @itemswaiting="";
!   my $sth = $dbh->prepare("select * from reserves where (borrowernumber = ?) and (reserves.found='W')");
!   $sth->execute($bornum);
    if (my $data=$sth->fetchrow_hashref) {
      push @itemswaiting,$data->{'itemnumber'};
    }
    $sth->finish;
+   return (\@itemswaiting);
  }
  





More information about the Koha-cvs mailing list