version 1.22, 2001/03/15 19:16:42
|
version 1.27, 2001/03/15 19:32:31
|
Line 424 sub advancedsearch {
|
Line 424 sub advancedsearch {
|
my ($r,$envhash)=@_; |
my ($r,$envhash)=@_; |
my %ENV=%{$envhash}; |
my %ENV=%{$envhash}; |
|
|
return <<(END); |
$r->print(<<END); |
Advanced searching is not yet implemented. |
Advanced searching is not yet implemented. |
END |
END |
|
return OK; |
|
} |
|
|
|
# ---------------------------------------------------- see if a field is filled |
|
sub filled { |
|
return ($_=~/\S/); |
} |
} |
|
|
# --------------------------------------------------- Performing a basic search |
# --------------------------------------------------- Performing a basic search |
Line 435 sub basicsearch {
|
Line 440 sub basicsearch {
|
my ($r,$envhash)=@_; |
my ($r,$envhash)=@_; |
my %ENV=%{$envhash}; |
my %ENV=%{$envhash}; |
|
|
&output_blank_field_error($r) unless length($ENV{'form.basicexp'}); |
unless (&filled($ENV{'form.basicexp'})) { |
|
&output_blank_field_error($r); |
|
return OK; |
|
} |
|
|
my $query=$ENV{'form.basicexp'}; |
my $query=$ENV{'form.basicexp'}; |
$query="select * from metadata where concat(title,\" \",author) like '\%$ENV{'form.basicexp'}\%'"; |
$query="select * from metadata where concat(title,\" \",author) like '\%$ENV{'form.basicexp'}\%'"; |