Solved

How to search for more than one word?

Posted on 2004-08-27
5
156 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

860 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