|
Lines 46-53
my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, coun
Link Here
|
| 46 |
FROM borrowers |
46 |
FROM borrowers |
| 47 |
WHERE surname LIKE ? |
47 |
WHERE surname LIKE ? |
| 48 |
OR firstname LIKE ? |
48 |
OR firstname LIKE ? |
| 49 |
OR cardnumber LIKE ? |
49 |
OR cardnumber LIKE ?); |
| 50 |
ORDER BY surname, firstname); |
50 |
if (C4::Context->preference("IndependentBranchPatron")){ |
|
|
51 |
if (C4::Context->userenv && (C4::Context->userenv->{flags} % 2) !=1 && C4::Context->userenv->{'branch'}){ |
| 52 |
$sql.=" AND borrowers.branchcode =".$dbh->quote(C4::Context->userenv->{'branch'}) unless (C4::Context->userenv->{'branch'} eq "insecure"); |
| 53 |
} |
| 54 |
} |
| 55 |
|
| 56 |
$sql .= qq( ORDER BY surname, firstname); |
| 51 |
my $sth = $dbh->prepare( $sql ); |
57 |
my $sth = $dbh->prepare( $sql ); |
| 52 |
$sth->execute("$query%", "$query%", "$query%"); |
58 |
$sth->execute("$query%", "$query%", "$query%"); |
| 53 |
|
59 |
|
| 54 |
- |
|
|