[Koha-cvs] CVS: koha/C4 Search.pm,1.80,1.81

Paul POULAIN tipaul at users.sourceforge.net
Thu Dec 4 10:33:34 CET 2003


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

Modified Files:
	Search.pm 
Log Message:
prepare(?) execute($var) fixes

Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -r1.80 -r1.81
*** Search.pm	18 Sep 2003 10:19:29 -0000	1.80
--- Search.pm	4 Dec 2003 09:33:32 -0000	1.81
***************
*** 1249,1258 ****
  #  print $query;
    while (my $data=$sth->fetchrow_hashref){
!     my $iquery = "Select * from issues
!     where itemnumber = '$data->{'itemnumber'}'
!     and returndate is null";
      my $datedue = '';
      my $isth=$dbh->prepare($iquery);
!     $isth->execute;
      if (my $idata=$isth->fetchrow_hashref){
        $datedue = format_date($idata->{'date_due'});
--- 1249,1256 ----
  #  print $query;
    while (my $data=$sth->fetchrow_hashref){
!     my $iquery = "Select * from issues where itemnumber = ? and returndate is null";
      my $datedue = '';
      my $isth=$dbh->prepare($iquery);
!     $isth->execute($data->{'itemnumber'});
      if (my $idata=$isth->fetchrow_hashref){
        $datedue = format_date($idata->{'date_due'});
***************
*** 1268,1272 ****
      }
      if ($datedue eq ''){
! 	$datedue="Available";
  	my ($restype,$reserves)=CheckReserves($data->{'itemnumber'});
  	if ($restype){
--- 1266,1270 ----
      }
      if ($datedue eq ''){
! #	$datedue="Available";
  	my ($restype,$reserves)=CheckReserves($data->{'itemnumber'});
  	if ($restype){
***************
*** 1481,1492 ****
      my ($bibitem) = @_;
      my $dbh   = C4::Context->dbh;
!     my $query = "Select *,biblioitems.notes as bnotes from biblio, biblioitems,itemtypes
! where biblio.biblionumber = biblioitems.biblionumber
! and biblioitemnumber = $bibitem
! and biblioitems.itemtype = itemtypes.itemtype";
      my $sth   = $dbh->prepare($query);
      my $data;
  
!     $sth->execute;
  
      $data = $sth->fetchrow_hashref;
--- 1479,1487 ----
      my ($bibitem) = @_;
      my $dbh   = C4::Context->dbh;
!     my $query = "Select *,biblioitems.notes as bnotes from biblio, biblioitems,itemtypes where biblio.biblionumber = biblioitems.biblionumber and biblioitemnumber = ? and biblioitems.itemtype = itemtypes.itemtype";
      my $sth   = $dbh->prepare($query);
      my $data;
  
!     $sth->execute($bibitem);
  
      $data = $sth->fetchrow_hashref;





More information about the Koha-cvs mailing list