Lines 45-51
if ($auth_status ne "ok") {
Link Here
|
45 |
|
45 |
|
46 |
my $dbh = C4::Context->dbh; |
46 |
my $dbh = C4::Context->dbh; |
47 |
my $sql = q( |
47 |
my $sql = q( |
48 |
SELECT surname, firstname, cardnumber, address, city, zipcode, country |
48 |
SELECT borrowernumber, surname, firstname, cardnumber, address, city, zipcode, country |
49 |
FROM borrowers |
49 |
FROM borrowers |
50 |
WHERE ( surname LIKE ? |
50 |
WHERE ( surname LIKE ? |
51 |
OR firstname LIKE ? |
51 |
OR firstname LIKE ? |
Lines 68-74
print "[";
Link Here
|
68 |
my $i = 0; |
68 |
my $i = 0; |
69 |
while ( my $rec = $sth->fetchrow_hashref ) { |
69 |
while ( my $rec = $sth->fetchrow_hashref ) { |
70 |
if($i > 0){ print ","; } |
70 |
if($i > 0){ print ","; } |
71 |
print "{\"surname\":\"" . $rec->{surname} . "\",\"" . |
71 |
print "{\"borrowernumber\":\"" . $rec->{borrowernumber} . "\",\"" . |
|
|
72 |
"surname\":\"".$rec->{surname} . "\",\"" . |
72 |
"firstname\":\"".$rec->{firstname} . "\",\"" . |
73 |
"firstname\":\"".$rec->{firstname} . "\",\"" . |
73 |
"cardnumber\":\"".$rec->{cardnumber} . "\",\"" . |
74 |
"cardnumber\":\"".$rec->{cardnumber} . "\",\"" . |
74 |
"address\":\"".$rec->{address} . "\",\"" . |
75 |
"address\":\"".$rec->{address} . "\",\"" . |