Searching - Comparisons
FieldNamecomp=XX
You can compare data during a search in many different ways -- the field may match exactly, greater than, less than, in a range, etc. You tell WebCatalog how to compare fields in a database by typing the field name followed by comp into a URL. As a shortcut, you can also put the two-letter comparison code in front of the fieldname's data specifier.
If your database has a field called "FirstName", and you want to look for records that are alphabetically arranged after "Grant" in the FirstName field, then you would enter a URL something like this:
http://Results.tpl?command=search&FirstNamedata=Grant&FirstNamecomp=gt&db=SomeDatabase.db
shortcut equivalent form for the search above:
http://Results.tpl?command=search>FirstNamedata=Grant&db=SomeDatabase.db
The template "Results.tpl" will be displayed after the search, and any [FoundItems] contexts in it will be filled with found records. "gt" stands for "greater than", meaning that the FirstName field must be greater than "Grant", otherwise it won't be considered a match.
Below is a list of all the different ways to compare information in a field. All comparisons are not case-sensitive (unless you force them to be), so "JOE" is the same as "Joe":
| Comp | Description |
|---|---|
|
ls |
less than - lsFirstNamedata=Grant finds all records whose FirstName field is alphabetically "less than" Grant. |
|
le |
less than or equal to - leFirstNamedata=Grant finds all records whose FirstName field is alphabetically "less than or equal to" Grant. |
|
eq |
equal to (default option for numbers) - eqFirstNamedata=Grant finds all records whose FirstName field is alphabetically "equal to" Grant (upper and lower case don't matter unless you want them to: see Case Sensitivity) |
|
ge |
greater than or equal to - geFirstNamedata=Grant finds all records whose FirstName field is alphabetically "greater than or equal to" Grant. |
|
gr |
greater than - grFirstNamedata=Grant finds all records whose FirstName field is alphabetically "greater than" Grant. |
|
rn |
range: field contains two numbers separated by space, or + rnZipCodedata=92069+93090 finds all records whose ZipCode field is numerically in the range of 92069 - 93090 |
|
mr |
minimum range value: if no maximum then ge is used instead |
|
xr |
maximum range value: if no minimum than le is used instead |
|
ne |
not equal - neFirstNamedata=Grant finds all records whose FirstName field is alphabetically "not equal" Grant. |
|
bw |
begins with - bwFirstNamedata=Jo finds all records whose FirstName field "begins with" Jo, as in "Joe", "Joseph", "Josephine". |
|
cl |
close to (numeric only). clZipCodedata=92069&clZipCodedata=10 finds all records whose ZipCode field is within 10 of 92069 (92059 - 92079) |
|
ws |
Interpret the words as a single string to be matched (including spaces etc.) This lets you find entire phrases, like "Joe enjoys butter" only if those 3 words are next to each other in that order, including spaces (unlike wa and wo, below) |
|
wa |
Separate the words and "and" them together (all must match). Searching for 3 words using wa will match only if all 3 are in the field, but not necessarily next to each other. |
|
wo |
Separate the words and "or" them together (at least one must match - default option for text). Search for 3 words using wo will match if any one of them matches. |
|
wn |
word not equal - none of the words match text in the specified field |