Lines 44-50
if ($auth_status ne "ok") {
Link Here
|
44 |
} |
44 |
} |
45 |
|
45 |
|
46 |
my $dbh = C4::Context->dbh; |
46 |
my $dbh = C4::Context->dbh; |
47 |
my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, country |
47 |
my $sql = qq(SELECT borrowernumber, surname, firstname, cardnumber, address, city, zipcode, country |
48 |
FROM borrowers |
48 |
FROM borrowers |
49 |
WHERE surname LIKE ? |
49 |
WHERE surname LIKE ? |
50 |
OR firstname LIKE ? |
50 |
OR firstname LIKE ? |
Lines 58-64
print "[";
Link Here
|
58 |
my $i = 0; |
58 |
my $i = 0; |
59 |
while ( my $rec = $sth->fetchrow_hashref ) { |
59 |
while ( my $rec = $sth->fetchrow_hashref ) { |
60 |
if($i > 0){ print ","; } |
60 |
if($i > 0){ print ","; } |
61 |
print "{\"surname\":\"" . $rec->{surname} . "\",\"" . |
61 |
print "{\"borrowernumber\":\"" . $rec->{borrowernumber} . "\",\"" . |
|
|
62 |
"surname\":\"".$rec->{surname} . "\",\"" . |
62 |
"firstname\":\"".$rec->{firstname} . "\",\"" . |
63 |
"firstname\":\"".$rec->{firstname} . "\",\"" . |
63 |
"cardnumber\":\"".$rec->{cardnumber} . "\",\"" . |
64 |
"cardnumber\":\"".$rec->{cardnumber} . "\",\"" . |
64 |
"address\":\"".$rec->{address} . "\",\"" . |
65 |
"address\":\"".$rec->{address} . "\",\"" . |