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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Search Form

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
Hi

I am wondering if there are any good tutorials on how to create a multiple parameter search form looking up and SQL database.

I want to create a search form similar to the one's you see on job websites or real estate property searches.

It will be a mixture of checkboxes, dropdown lists.

Any help please on where to start or how to write a query for this.

 
This is a question or the SQL forums, depending on the db you are using. They can help with the syntax. As far as the front end, it is just a matter of passing the correct parameters to a stored proceudre.
 
depending on the complexity you can also look into dynamic sql with parametrized queries (ORM frameworks do this very well), or indexed searching with a framework like Lucene.Net.

with Lucene you decorate objects with attributes from the Lucene framework. Then you can read write to persistent storage for Lucene, also part of the framework. it's like a database, but it's not. not a relational database anyway.

so as entities are indexed, you can query Lucene to get the entity ids (primary key). with these primary keys you can then query the database. My understanding is that querying by PK is the most efficient method to query.

this approach also work well if your system must target multiple database (mysql, mssql, oracle, etc).

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top