Searching - "And" vs. "Or"
FieldNamedatarq=value
Sometimes you want to match one field and another field at the same time -- this if often called "anding fields together". Examples are "Find all people whose first name is Grant and last name is Hulbert" or perhaps "Find all houses that have more than 5 bedrooms and a fireplace and 2 bathrooms".
By default, if you don't specify that certain fields are required to match, they are "or-ed" together, which in the above examples would read like "Find all people whose first name is Grant or last name is Hulbert" or perhaps "Find all houses that have more than 5 bedrooms or a fireplace or 2 bathrooms".
To require particular fields to match during a search, put the letters "rq" after the data specifier, as in the following examples:
| FirstName is Grant and LastName is Hulbert | eqFirstNamedatarq=Grant&eqLastNamedatarq=Hulbert |
| Bedrooms > 5 and fireplace is True and Bathrooms is 2 | gtBedsdatarq=5&eqFireplacedatarq=T&eqBathsdatarq=2 |
A complete URL for one of these searches might look like this:
http://Results.tpl?command=search&eqFirstNamedatarq=Grant&eqLastNamedatarq=Hulbert&db=People.db
The Results.tpl file would contain a [FoundItems] loop that gets filled with all the records that match, and the resulting HTML would be sent back to the browser.