Solved

How to search for more than one word?

Posted on 2004-08-27
5
155 Views
Last Modified: 2013-12-24
I created a search form for our chamber of commerce at www.sodachamber.com which works with one word searches. How do I make it work with more than one word or just part of the words visitors type in?
  Are there any good online tutorials or books that teach detailed ASP database programming with FrontPage 2003?
0
Comment
Question by:annyearsley
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:rcmb
ID: 11924146
Is the search searching the entire site or a database?
0
 

Author Comment

by:annyearsley
ID: 11924597
Just the database. I am using Atomz as a entire site search.
0
 
LVL 12

Expert Comment

by:rcmb
ID: 11925715
In your SQL statement all you need to do is have the statement read WHERE SearchField LIKE '%::FieldName::%'

This is a contains statement which will find the following:

If you enter the word "at" it would return

Bat
Hat
Attic
What
Cathy

Try this and let me know how it works for you.

RCMB
0
 

Author Comment

by:annyearsley
ID: 11927574
Yes, it does work that way. It will pick part of any word out but won't work if you type in two words, even if one word matches. Thanks!
0
 
LVL 12

Accepted Solution

by:
rcmb earned 125 total points
ID: 11927714
If you desire to search for two words then put in a second text box on your search form and change your query to look like:

WHERE (SearchField1 LIKE '%::FieldName::%' OR SearchField2 LIKE '%::FieldName::%')

Otherwise we are going to have to get away from frontpage wizards and use VBScript to write the code.

RCMB
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question