interactivetools.com
Quickstart Guide...
How to Install
How to Upgrade
How to Move Servers
How to Private Label
Restore Hacked Sites
Getting Started
In-Depth Getting Started Guide
Working With Generated Code Guide
Viewers
Viewer Options
Displaying Uploads
Search Engines
Special Fieldnames
Admin Menu
General Settings
Private Labeling
User Accounts
Section Editor (List)
Add New Editor
Section Editor (Edit)
Field Editor
Text Field
Text Box
Wysiwyg
Date/Time
List
Checkbox
Upload
Separator
Regional Settings
Code Generator
Show Code

View Changelog »
Glossary
Need Help? Questions?
Post in forum »

Viewer Search Engines

CMS Builder makes it easy to quickly create custom search engines.

Search Field Format
You create a basic search engine by entering the name of the field you want to search followed by the type of search you want to do, then adding that to the url or search form.

Format Search Type Notes
fieldname Exact match Entire field value must match (case-insensitive).
Note: For multi-value list fields only one of the field values must match.
fieldname_match Exact match
fieldname_keyword Contains keyword Field value must contain keyword (case-insensitive)
fieldname_prefix Starts with Field value must starts with keyword (or letter) (since v1.21)
fieldname_query Matches query Allows google-style query searches such as: +dog -cat "multi word phrase". Only records matching EVERY word or quoted phrase are returned. Words or phrases that start with - mean "must not match". Plus is optional and not required. (since v1.11)
fieldname_empty Matches blank fields Matches fields that are blank (""). Example: email_empty=1 (since v2.07)
fieldname_min Minimum value For numeric searches (can be used for date searches as well if date is specified as YYYYMMDDHHMMSS, non-numeric chars are ignored)
fieldname_max Maximum value For numeric searches (can be used for date searches as well if date is specified as YYYYMMDDHHMMSS, non-numeric chars are ignored)
fieldname_year Year number For date searches (since v1.08)
fieldname_month Month number For date searches (since v1.08)
fieldname_day Day of month For date searches (since v1.08)
format[] Multi value OR search To do an "OR" search for multiple values add [] after the fieldname and search type, eg: ?name_match[]=joe&name_match[]=bob (since v2.60)

Tip: You can combine date searches with other types of searches. For example 'articleList.php?date_year_min=2005' would show all articles with a date of 2005 or later.
Basic Url Search
You can create a special link that only lists specific records. Just add a ("?") after your url, following by the search conditions (fieldname=value).

Example: listViewer.php?color=blue
Multiple search conditions can be combined with ("&").

Example: listViewer.php?color=blue&size=XXL
Note that if 'where' clause is specified in the list options then any form field keywords will be ignored.

Tip: When hand-coding urls non-alphanumeric characters need to be encoded so browsers understand them (like this: %21%22). This is called 'url encoding'. You may have seen it before when doing a Google search. If your search value isn't working, try encoding the value below before copying it into the url.

Multi-field Search
You can search multiple fields just as easy as one field. Just create a comma seperated list of fields followed by the search prefix.

Example: articleList.php?title,summary,content_keyword=Vancouver
Custom Search Forms
You can create search forms by naming the fields after what you want them to search. Here is a simple search form that searches the "title" field for a keyword.

<form method="POST" action="/path/to/your/listViewer.php">
  <input type="text" name="title_keyword" value="">
  <input type="submit" name="submit" value="Search">
</form>
Alternative Search Urls (Advanced)
Many servers support having extra "Path Info" after the url like this: "viewer.php/size-3/". This makes it appear as if a page or directory exists even if it doesn't and is great for search engine optimization.

The format is the same as for "Basic Url Searches" except instead of = you use - and instead of & you use /. Here's the same example as above:

Example: listViewer.php/color-blue/size-XXL/
The quickest way to determine if your server support "Path Info" searches is to try one. Servers that don't support it will give a not found or other error message.
MySql WHERE Searches (advanced)
If you are comfortable with MySql you can specify a custom MySql WHERE clause in List Viewer options. Note that any form field keywords will be ignored if a 'where' option is specified. Example:

Example: 'where' => 'price >= 250000 AND bedrooms = 2',
Copyright © 1999-2024 interactivetools.com, inc.