Search?db=DatabaseName&search1data=xx&search2data=yy
- Searches for matching records in a database and returns the found ones.
The search command looks through every record in the database and returns records
that match the search criteria. It is extremely fast and flexible - you can search
through multiple fields and sort the results in just about any way imagineable. The
"matched" or "hit" records in the database are displayed in a
[FoundItems] loop.
Searching can be very sophisticated, so we have dedicated a complete chapter section
to it here.
Example (normally you would link to a URL or form containing the following
information):
- http://yourserver.com/xx.tpl?command=Search&db=SomeDatabase.db&eqNAMEdata=Grant
Try It!
The database "SomeDatabase.db" is opened, all records whose name
field is "Grant" are found, and any [FoundItems]..[/FoundItems]
contexts in the template xx.tpl are filled with the list of found records.
Here are some equivalent ways to send the same command:
| HTML Source |
Description |
- <a href="/WebCatalog/WebCatalog.acgi
?command=Search&template=xx.tpl&db=SomeDatabase.db
&eqNAMEdata=Grant">
|
Hyperlink to WebCatalog CGI |
- <a href="xx.tpl?command=Search&db=SomeDatabase.db&eqNAMEdata=Grant">
|
Hyperlink to WebCatalog plugin |
- <form method="POST" action="/WebCatalog/WebCatalog.acgi">
<input type="hidden" name="command" value="Search">
<input type="hidden" name="template" value="xx.tpl">
<input type="hidden" name="db" value="SomeDatabase.db">
<input name="eqNAMEdata" value="Grant">
<input type="submit">
</form>
|
- Form-based command to CGI
(notice you must specify a template)
|
- <form method="POST" action="xx.tpl">
<input type="hidden" name="command" value="Search">
<input type="hidden" name="template" value="xx.tpl">
<input type="hidden" name="db" value="SomeDatabase.db">
<input name="eqNAMEdata" value="Grant">
<input type="submit">
</form>
|
- Form-based command to plugin
(notice the template is part of the action)
|