PassMark Logo
Home » Forum

Searching across x2 fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JayD
    Junior Member
    • Sep 2009
    • 2

    #1

    Searching across x2 fields

    Hi,

    I've a basic search form, with x2 input fields:

    "Subject" and "Location"

    Record #1
    <meta name="Subject" content="Mechanic">
    <meta name="Suburb" content="Granville">
    <meta name="State" content="NSW">

    Record #2
    <meta name="Subject" content="Mechanic">
    <meta name="Suburb" content="Granville">
    <meta name="State" content="QLD">


    So if a user enters data in the search input fields as:
    Subject = Mechanic
    Location = Granville, NSW

    How can I specify that the "location" must in fact search across x2 meta tag fields -- ie. Suburb and State?

    Thankyou!
    Jay.
  • Ray
    Administrator
    • Dec 2004
    • 4357

    #2
    Any reason why you don't want to have 3 input fields, so that the user can specify the Suburb and State individually?

    I can't think of any obvious way to make a search apply across two different fields, that's a very unusual requirement.

    You could, alternatively, change your data set such that they contain a single location field, e.g.
    <meta name="Location" content="Granville, NSW">
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    Working...