CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
AND Searches

 



Wiliam
Novice

Aug 23, 2000, 2:49 AM

Post #1 of 1 (830 views)
AND Searches Can't Post

Hi all!

Brand-spanking new problem with an easy solution but I've got the wrtiers block.

I've got the following code. The code goes through an array of things to search.

I want the script to search in AND form. That is, if I tick two checkboxes on the search page then the script will look for results that match the TWO checkboxes not just one.

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>



@search_fields = ($e_dat_name,$w_dat_name,$e_dat_key,$w_dat_key,$dat_age,
$dat_new,$dat_lang,$dat_star,$dat_hits,$dat_id);

@search_terms = ($A::e_dat_name,$A::w_dat_name,$A::e_dat_key,$A::w_dat_key,$A::dat_age,
$A::dat_new,$A::dat_lang,$A::dat_star,$A::dat_hits,$A::dat_id);

if ($term) {
if ($field =~ /$term/ig) {
$tobesorted{$file} = $e_dat_name;
}
}

</pre><HR></BLOCKQUOTE>

Thanks for your help!

Wil.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives