Fixing some bogus sql
This commit is contained in:
parent
98dbf5769f
commit
8b84c25809
1 changed files with 4 additions and 4 deletions
|
@ -79,8 +79,8 @@ C<$n> is 0, it will return all matching subjects.
|
||||||
sub listsubjects {
|
sub listsubjects {
|
||||||
my ($sub,$num,$offset)=@_;
|
my ($sub,$num,$offset)=@_;
|
||||||
my $dbh = C4::Context->dbh;
|
my $dbh = C4::Context->dbh;
|
||||||
my $query="Select * from bibliosubject where subject like '?%' group by subject";
|
my $query="Select * from bibliosubject where subject like ? group by subject";
|
||||||
my @bind = ($sub);
|
my @bind = ("$sub%");
|
||||||
# FIXME - Make $num and $offset optional.
|
# FIXME - Make $num and $offset optional.
|
||||||
# If $num was given, make sure $offset was, too.
|
# If $num was given, make sure $offset was, too.
|
||||||
if ($num != 0){
|
if ($num != 0){
|
||||||
|
@ -156,8 +156,8 @@ is the number of elements in C<$results>.
|
||||||
sub deletedbib{
|
sub deletedbib{
|
||||||
my ($title)=@_;
|
my ($title)=@_;
|
||||||
my $dbh = C4::Context->dbh;
|
my $dbh = C4::Context->dbh;
|
||||||
my $sth=$dbh->prepare("Select * from deletedbiblio where title like '?%' order by title");
|
my $sth=$dbh->prepare("Select * from deletedbiblio where title like ? order by title");
|
||||||
$sth->execute($title);
|
$sth->execute("$title%");
|
||||||
my @results;
|
my @results;
|
||||||
my $i=0;
|
my $i=0;
|
||||||
while (my $data=$sth->fetchrow_hashref){
|
while (my $data=$sth->fetchrow_hashref){
|
||||||
|
|
Loading…
Reference in a new issue