Sample Code showing use of 'AND' filter:
<MvASSIGN NAME = "phrase"
VALUE = " Build the filter, from this phrase.">
<MvASSIGN NAME = "filter"
VALUE = "{Phrase_Filter('fieldname', phrase, 'AND')}">
<MvFILTER
NAME = "your_db_name"
FILTER = "{& [filter]}">
MvFILTER Code as processed:
<MvFILTER
NAME = "your_db_name"
FILTER = "{&[filter]}">
Phrase_Filter
===========================================================
This function builds a filter for the Miva v3.2
tag which is used for sequentially searching DBIII databases.
It is especially useful for searching MEMO fields but can be
used on any text field.
It uses three PARAMETERS:
fieldname = The name of the database field to search
(do not include the 'd.' prefix).
phrase = The phrase used to build the search filter.
bool = Either 'AND or 'OR'. Use 'AND' to find records that
contain ALL OF THE CRITICAL WORDS from the phrase although not
necessarily in the same order as in the phrase. 'OR' will find
records that contain ANY OF THE CRITICAL WORDS from the phrase.
In an attempt to ensure that search results contain only
relevent records, the l.freq_word variable contains a short list
of the most frequently used words in American English. THESE
WORDS WILL NOT BE INCLUDED IN THE FILTER. If your DB is in
another language then you will need to change this list to the
most frequently used words in that language.
Released to PD 1998, Brian R. Bullock (brian@wwwebweaver.com)
===========================================================