View Full Version : Database Search Showing All Results

10-31-2005, 08:59 PM
Hey there,.

I have created a database in ACCESS and Website with DREAMWEAVER.

In this site we have created a

search page,
results page,
detail page.

When you search the website you get all results in the results page.

In the database we have 4 words. Cat, Dog, Mouse & Bird.

When you search for Bird. You also get the results for Cat, Dog & Mouse.

Can anyone suggest where I may have gone wrong.

Thanks for your help.


Creative Insanity
10-31-2005, 09:10 PM
I don't know anything about access as I use mysql, so I am guessing you are using ASP.

But anyway, in php I would do a selective search and in theory you need to setup the search form to have a dropdown for the catagories (IE: cat, dog, bird) and another text field where the search for that catagory can be entered.

11-02-2005, 11:40 AM
please bare with me as i am not an ASP user.

can you echo the select statement to the page then paste the results into this thread.

i assume you can use echo in ASP or echo var or i think maybe Response.Write

go to your results page and locate the line where you query the database..It should have a "SELECT * FROM TABLE WHERE FIELD ='VALUE'"
There will be a variable defined before this statement. add an <span style='color:blue'>echo</span> to the begining of the line.

now run the page as you would normaly but this time you should see...

select * from table where field ='cat'

printed to the page.
copy this and submit it to this thread

11-04-2005, 09:46 AM
Ok, I will have a play with that. I think I understand what you have said.

Thanks heaps for taking the time to answer.