Skip to main content
Participant
August 5, 2006
Question

Building a simple search engine

  • August 5, 2006
  • 4 replies
  • 386 views
I am trying to build a search engine with these instructions:
http://www.adobe.com/support/dreamweaver/programs/mx_search/mx_search04.html

I am doing exactly what the instructions say.

My problem is that I cannot take back any results.
I have made many tests and I found that the problem is the 'equal' sign.
When I put <> then there are results(not what I want of course).
I test it with 'test' button of recordset and with the pages itself(search page-results page). No luck,=.
I cannot understand why this happens.
I tried almost everything. Search about anything. I see the data in the database and I am giving search strings that exist. But no results yet.
Do you have any idea where the problem is?
This topic has been closed for replies.

4 replies

Inspiring
August 7, 2006
Hi cool11,

Just an update: i got my little simple search engine to work. Im not sure what language or database your using but im using ASP and Access. I have a table in my database called PAGES and in that table i have the columns:

> PAGEID
> PAGENAME
> KEYWORDS
> URL

im just about to add a description too.

Then i connected the database. Create a form with one textbox called Search, made the action of the form point to my results page. Thats that page done.

On the results page i just created a recordset which search my keywords column then for the condition i set to 'contains'. third box set to form variable and the forth to the name of my text box on the search page. then just create a recordset to display ur results in a repeat table and your done!!

Hope this helps, give me a shout if you need help.

Adam
Inspiring
August 6, 2006
How exactly have you constructed your database? If your simply searching the page url then only exact maches will display results. Perhaps you shoulud think about adding a column called keywords or something? I am trying the same thing at the mo but its just the keywords im having trouble with.

Hope this helps,
Adam
cool11Author
Participant
August 5, 2006
I tried 'contains' because I think is better for what I want.
Results are slightly better but once again nothing seem to work right.
What I mean? For the first time I see results when I give nothing to search. It returns all the records. This could not happen with '='.
But when I search something that exists, it still does not give any matches.
Why?
I am doing everything the instructions said.
Inspiring
August 5, 2006
cool11 wrote:
> I have made many tests and I found that the problem is the 'equal' sign.
> I tried almost everything. Search about anything. I see the data in the
> database and I am giving search strings that exist. But no results yet.

The equals sign looks for an exact match. Try "contains", "begins with",
or "ends with". (The names may be slightly different in the Recordset
dialog box - I don't have DW open at the moment.)

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/