Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Searching two tables - one blank search field

New Here ,
Oct 15, 2008 Oct 15, 2008

Copy link to clipboard

Copied

I have a databse which links locations to regions of the UK and also to a type. They type and the regions are stored in two separate tables both of the type with two fields id and text. The ids link to another table (location) which has a regionid and typeid field to refere to the detail tables. I have a search page to allow to search Region AND Type which works fine if I select something in both text boxes but returns nothing if one is left blank. How do I get round this?
TOPICS
Server side applications

Views

185
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 20, 2008 Oct 20, 2008

Copy link to clipboard

Copied

LATEST
Sounds like some manual coding to me. If I understand you correctly
you have two search fiels and if one is blank then you get no results.

Questions
- What is you platform?
- Do you want users to enter info for both fields?
- How large is the table or how large will it be?

Quick suggestion
- If table is small a quick and dirty way is to use wild cards for both
fields.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines