PDA

View Full Version : Searching across x2 fields



JayD
09-22-2009, 01:33 AM
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
09-22-2009, 05:02 AM
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">