Help with Search Form Results

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have set up a search form that queries a database. In the search form are
different fields to search. The form works fine if I just search one of the
fields, but if I try to narrow down the search by entering information into 2
fields, the results are not narrowed down. i.e. If I search by last name and
city instead of getting only the people with that specific last name in the
city, I get everyone in that city.

Please help!
 
Check you SQL - you are probably using 'or' and instead of 'and'.
 
Thanks for your help. That was what I was missing.

Now, I'm trying to query by last name with a text box and city with a
drop-down box. I am wanting to be able to leave either last name or city
empty and just search by the other, but it is not letting me do that. It is
requiring that I enter information into both fields.
Can you help me again?
 

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

Back
Top