Added barcode query back to circ/ysearch.pl for patron proxies.

This is to allow patron proxy relationships to be built using the patron barcode.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Daniel Sweeney 2009-03-25 16:37:17 -05:00 committed by Galen Charlton
parent e0da512939
commit 415d5ac3bb

View file

@ -45,10 +45,11 @@ my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode
FROM borrowers FROM borrowers
WHERE surname LIKE ? WHERE surname LIKE ?
OR firstname LIKE ? OR firstname LIKE ?
OR cardnumber LIKE ?
ORDER BY surname, firstname); ORDER BY surname, firstname);
#"OR cardnumber LIKE '" . $query . "%' " .
my $sth = $dbh->prepare( $sql ); my $sth = $dbh->prepare( $sql );
$sth->execute("$query%", "$query%"); $sth->execute("$query%", "$query%", "$query%");
while ( my $rec = $sth->fetchrow_hashref ) { while ( my $rec = $sth->fetchrow_hashref ) {
print $rec->{surname} . ", " . $rec->{firstname} . "\t" . print $rec->{surname} . ", " . $rec->{firstname} . "\t" .
$rec->{cardnumber} . "\t" . $rec->{cardnumber} . "\t" .