push(@bind,$searchstring);
}
# $query .= " and freelib like \"$searchstring%\"" if ($searchstring);
- $query .= " order by category,freelib limit ?,?";
+ $query .= " limit ?,?";
push(@bind,$offset,($pagesize*4));
-# warn "q : $query";
+ warn "q : $query".@bind;
my $sth=$dbh->prepare($query);
$sth->execute(@bind);
my @results;
my ($cnt) = $sth->fetchrow;
$cnt = $pagesize+1 if ($cnt>$pagesize);
$sth->finish();
- return ($cnt,\@results);
+ return ($#results,\@results);
}
=item SearchDeeper