[Koha-cvs] CVS: koha overdue.pl,1.8,1.8.2.1

MJ Ray slef at users.sourceforge.net
Thu Jan 8 18:15:49 CET 2004


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

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

Index: overdue.pl
===================================================================
RCS file: /cvsroot/koha/koha/overdue.pl,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** overdue.pl	3 Jul 2003 22:00:21 -0000	1.8
--- overdue.pl	8 Jan 2004 17:15:47 -0000	1.8.2.1
***************
*** 57,63 ****
  my $dbh = C4::Context->dbh;
  
! my $query="select date_due,borrowernumber,itemnumber from issues where isnull(returndate) && date_due<'$todaysdate' order by date_due,borrowernumber";
! my $sth=$dbh->prepare($query);
! $sth->execute;
  
  my @overduedata;
--- 57,62 ----
  my $dbh = C4::Context->dbh;
  
! my $sth=$dbh->prepare("select date_due,borrowernumber,itemnumber from issues where isnull(returndate) && date_due<? order by date_due,borrowernumber");
! $sth->execute($todaysdate);
  
  my @overduedata;
***************
*** 67,73 ****
    $itemnum=$data->{'itemnumber'};
  
!   my $query="select concat(firstname,' ',surname),phone,emailaddress from borrowers where borrowernumber='$bornum'";
!   my $sth1=$dbh->prepare($query);
!   $sth1->execute;
    $data1=$sth1->fetchrow_hashref;
    $name=$data1->{'concat(firstname,\' \',surname)'};
--- 66,71 ----
    $itemnum=$data->{'itemnumber'};
  
!   my $sth1=$dbh->prepare("select concat(firstname,' ',surname),phone,emailaddress from borrowers where borrowernumber=?");
!   $sth1->execute($bornum);
    $data1=$sth1->fetchrow_hashref;
    $name=$data1->{'concat(firstname,\' \',surname)'};
***************
*** 76,91 ****
    $sth1->finish;
  
!   # FIXME - There's already a $query in this scope.
!   my $query="select biblionumber from items where itemnumber='$itemnum'";
!   my $sth2=$dbh->prepare($query);
!   $sth2->execute;
    $data2=$sth2->fetchrow_hashref;
    $biblionumber=$data2->{'biblionumber'};
    $sth2->finish;
  
!   # FIXME - There's already a $query in this scope.
!   my $query="select title,author from biblio where biblionumber='$biblionumber'";
!   my $sth3=$dbh->prepare($query);
!   $sth3->execute;
    $data3=$sth3->fetchrow_hashref;
    $title=$data3->{'title'};
--- 74,85 ----
    $sth1->finish;
  
!   my $sth2=$dbh->prepare("select biblionumber from items where itemnumber=?");
!   $sth2->execute($itemnum);
    $data2=$sth2->fetchrow_hashref;
    $biblionumber=$data2->{'biblionumber'};
    $sth2->finish;
  
!   my $sth3=$dbh->prepare("select title,author from biblio where biblionumber=?");
!   $sth3->execute($biblionumber);
    $data3=$sth3->fetchrow_hashref;
    $title=$data3->{'title'};





More information about the Koha-cvs mailing list