close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Search doesn't filter

Thread began 3/23/2014 6:31 pm by mrs | Last modified 4/17/2014 6:59 am by mrs | 2645 views | 12 replies

mrs

OK, after starting with a completely blank page other than my recordset for the search to work with, I allowed the search wizard to create the search form and its related fields for me. I then pasted my code to display the search results. So, now I have got a very plain page.

When I test it with something very specific, all records still seem to display based on the settings I used within the wizard. I have asked the wizard to use OR instead of AND, however, if I change the code to AND, the search then works… why?

I am asking it to look in 6 columns of a database table and return results related to the search parameter where one or more of the columns need to match to ensure that the record is displayed in the result, so surely this is a reason to use OR.

Is 'OR' saying match col1 OR col2 OR col3 OR col4 OR col5 OR col6 and show any record that does actually contain the text searched for whereas 'AND' is saying all cols must match before a record displays?

I simply changed:
$WADbSearch1->keywordComparison($KeyArr0,"".((isset($_POST["distsearch"]))?$_POST["distsearch"]:"") ."","OR","Includes",",%20","%20","%22","%22",0);

to

$WADbSearch1->keywordComparison($KeyArr0,"".((isset($_POST["distsearch"]))?$_POST["distsearch"]:"") ."","AND","Includes",",%20","%20","%22","%22",0);

for it to work.

Have I completely misunderstood the purpose between OR and AND in a search?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...