Print Page | Close Window

ASP Site Search

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=13027
Printed Date: 30 March 2026 at 4:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP Site Search
Posted By: XandarX
Subject: ASP Site Search
Date Posted: 17 December 2004 at 9:33pm
I have Web Wiz Site Search.  I like the feature of being able to search for multiple terms and have it bring back resulting pages with those terms somewhere on the page.  Can this be adapted to search in this way through an access database?



Replies:
Posted By: Gullanian
Date Posted: 18 December 2004 at 5:58am
The problem with searching databases is that everyones database is different.  You need to allow for data which shouldn't be publically viewable, and data which doesn't need to be viewed.  It would probably be best to write your own for your database.


Posted By: XandarX
Date Posted: 18 December 2004 at 1:41pm
I have done so, but it lacks functionality that I don't know how to create.
Example:
Searching for an artists name in a song list.
In the database they are listed as FirstName, LastName and Artist.
The first two fields are obvious as to content.  The third (Artist) is entered in the format of First Name, Last name (with the comma).
If someone searches for "Patsy Cline" it comes up with nothing, but "Cline, Patsy" returns appropriate results.  Unfortunately most people search by first name then last name. 
 
I need a search that finds any and all words in a record.  I don't know how to do it.
Anything you can recommend?


Posted By: Gullanian
Date Posted: 18 December 2004 at 2:07pm
Well, first of all storing artist when you already have the first name and last name isn't a good idea, it's called data repetition and theres no reason to do it.

You would probably want to split the name into it's corresponding parts then use the SQL 'LIKE' to search for records.

So for example someone typing in 'Patsy Cline', spit it into it's parts using the split() function, dump the results in an array and loop through the array searching for records matching those names.


Posted By: XandarX
Date Posted: 18 December 2004 at 4:52pm
The database comes to me with just the artist field.  Stored as "First name, Last Name".
 
I wrote a query to seperate them into two fields. That worked.
 
I then wrote a search engine to search the database, but I only know how to search through one field at a time, and I don't know how to split the SearchWord into seperate components.  Figures, eh?
 
I'll work on those ideas you offered in the meantime.  I should be able to figure something out.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net