Lines 27-33
sub search {
Link Here
|
27 |
} |
27 |
} |
28 |
|
28 |
|
29 |
my $dbh = C4::Context->dbh; |
29 |
my $dbh = C4::Context->dbh; |
30 |
my $select = "SELECT SQL_CALC_FOUND_ROWS |
30 |
my $select = "SELECT |
31 |
borrowers.borrowernumber, borrowers.surname, borrowers.firstname, borrowers.address, |
31 |
borrowers.borrowernumber, borrowers.surname, borrowers.firstname, borrowers.address, |
32 |
borrowers.address2, borrowers.city, borrowers.zipcode, borrowers.country, |
32 |
borrowers.address2, borrowers.city, borrowers.zipcode, borrowers.country, |
33 |
CAST(borrowers.cardnumber AS UNSIGNED) AS cardnumber, borrowers.dateexpiry, |
33 |
CAST(borrowers.cardnumber AS UNSIGNED) AS cardnumber, borrowers.dateexpiry, |
Lines 104-110
sub search {
Link Here
|
104 |
my $patrons = $sth->fetchall_arrayref({}); |
104 |
my $patrons = $sth->fetchall_arrayref({}); |
105 |
|
105 |
|
106 |
# Get the iTotalDisplayRecords DataTable variable |
106 |
# Get the iTotalDisplayRecords DataTable variable |
107 |
$query = "SELECT FOUND_ROWS()"; |
107 |
$query = "SELECT COUNT(*) ". $from . ($where ? $where : ""); |
108 |
$sth = $dbh->prepare($query); |
108 |
$sth = $dbh->prepare($query); |
109 |
$sth->execute; |
109 |
$sth->execute; |
110 |
($iTotalDisplayRecords) = $sth->fetchrow_array; |
110 |
($iTotalDisplayRecords) = $sth->fetchrow_array; |