Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Engine - ASP + MySQL

Status
Not open for further replies.

garrowsmith

Programmer
Jul 23, 2001
18
GB
Hi All,

anyone know of an ASP based search engine that will interrogate a MySQL db? Can't find anything on tek-tips nor the news groups.

Cheers,

Graham.
 
Most of the time this is something you would want to build from scratch. The reasoning behind this is simple, even if there were a global ASP/MySQL search then it would be horribly inefficient because it would a) have to be able to search all the fields in tables with any names, and b) would have to be able to create search criteria by guessword depending on fieldnames (like keywords, etc).

The basis of a search is that you have an entry that a user fills in. You then query your database using SQL to returen results that match the user entered criteria. Upon receiving results you loop through the recordset to display them.

To create a simple search you will need a form with a text input for the user to enter as search word, and a submit button to submit to your actual results page.
The results page would make a connection to your MySQL db and query it with the user entry, basically "SELECT * FROM tablename WHERE fieldname LIKE '%"&Request.Form("txtInput")&"%'"
You would then execute this statement into a recordset and loop the recordset until EOF, displaying the information.
I have noticed that snowboardr has a good deal of information about MySQL and ASP on his website, you give that a shot:
htpp://
-Tarwn "If you eat a live toad first thing in the morning, nothing worse will happen all day long." - California saying
"To you or the toad" - Niven's restatement of California saying
"-well most of the time anyway..." - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top