Search a database using 3 fields and an input text box.

M

Miguel Dias Moura

Hello,

What I know:
To send a Value in the URL and filter the results in order to display
only the database records which FIELD_A = Value.

What I need to do:

I have a page with an Input Text Box and a Search Button.
Each record of my database has 5 fields:
ID, Title, Author, Editor, Date.

In the Input Text Box keywords are entered by the user.
When the Search Button is pressed I want to show all records, in a new
page, which contains one of those keywords in Title, Author or Editor
fields.

Can someone help me out with this?

I am working with Dreamweaver MX 2004 and ASP.Net / VB.

Thank You,
Miguel
 
J

Jeffrey Palermo [MCP]

Miguel,
This is more of a database question than anything because your query
will have to do the heavy lifting. Your query will have to compare each
keyword to your fields. From the ASP.NET side it's easy. Just do a
Split( ) on the textbox value to get an array of keywords. After that, it's
SQL. I'm assuming that you are capable with SQL, so I will suggest that you
pass in the keywords to the query in a comma-separated string. Then in your
query, you can convert this string to a rowset and perform the joins and
comparisons necessary.

For help with your query, I suggest posting to a SQL newsgroup. The ASP.NET
side is easy.

Best regards,
Jeffrey Palermo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top