[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.51,1.52

Paul POULAIN tipaul at users.sourceforge.net
Fri Apr 11 10:42:06 CEST 2003


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

Modified Files:
	Circ2.pm 
Log Message:


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** Circ2.pm	10 Mar 2003 15:19:33 -0000	1.51
--- Circ2.pm	11 Apr 2003 08:42:02 -0000	1.52
***************
*** 39,42 ****
--- 39,43 ----
  use C4::Stats;
  use C4::Reserves2;
+ use C4::Koha;
  #use C4::Search;
  #use C4::Print;
***************
*** 338,352 ****
      my $dbh = C4::Context->dbh;
      my @borrowers;
!     my $q_key=$dbh->quote($key);
!     my $sth=$dbh->prepare("select * from borrowers where cardnumber=$q_key");
!     $sth->execute;
      if ($sth->rows) {
  	my ($borrower)=$sth->fetchrow_hashref;
  	push (@borrowers, $borrower);
      } else {
- 	$q_key=$dbh->quote("$key%");
  	$sth->finish;
! 	$sth=$dbh->prepare("select * from borrowers where surname like $q_key");
! 	$sth->execute;
  	while (my $borrower = $sth->fetchrow_hashref) {
  	    push (@borrowers, $borrower);
--- 339,351 ----
      my $dbh = C4::Context->dbh;
      my @borrowers;
!     my $sth=$dbh->prepare("select * from borrowers where cardnumber=?");
!     $sth->execute($key);
      if ($sth->rows) {
  	my ($borrower)=$sth->fetchrow_hashref;
  	push (@borrowers, $borrower);
      } else {
  	$sth->finish;
! 	$sth=$dbh->prepare("select * from borrowers where surname like ?");
! 	$sth->execute($key."%");
  	while (my $borrower = $sth->fetchrow_hashref) {
  	    push (@borrowers, $borrower);





More information about the Koha-cvs mailing list