fix for bug #54
authortipaul <tipaul>
Wed, 19 Mar 2003 21:37:21 +0000 (21:37 +0000)
committertipaul <tipaul>
Wed, 19 Mar 2003 21:37:21 +0000 (21:37 +0000)
C4/Search.pm

index 41175e7..0c82632 100755 (executable)
@@ -1802,7 +1802,15 @@ sub borrdata {
   $sth->execute;
   my $data=$sth->fetchrow_hashref;
   $sth->finish;
-  return($data);
+  if ($data) {
+       return($data);
+       } else { # try with firstname
+               my $sth=$dbh->prepare("select * from borrowers where firstname='$cardnumber'");
+               $sth->execute;
+               my $data=$sth->fetchrow_hashref;
+               $sth->finish;
+               return($data);
+       }
 }
 
 =item borrissues