This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
admin:indexing:autocomplete:sql [2011/01/24 22:07] els |
admin:indexing:autocomplete:sql [2016/06/28 22:38] (current) |
||
---|---|---|---|
Line 25: | Line 25: | ||
The following SQL statement provides the results shown in the previous example. Depending on the size of the database, it may be important to not issue a SQL statement until the user has typed two or three letters. That can dramatically affect the number of rows retrieved, and also the time required to query the Omnidex indexes. | The following SQL statement provides the results shown in the previous example. Depending on the size of the database, it may be important to not issue a SQL statement until the user has typed two or three letters. That can dramatically affect the number of rows retrieved, and also the time required to query the Omnidex indexes. | ||
- | <code sql> | + | <code> |
select FNAME, count(*) | select FNAME, count(*) | ||
from LIST | from LIST | ||
Line 86: | Line 86: | ||
As the user provides criteria to various fields, that criteria can also be included in the AutoComplete query. For example, the same statement above can be performed with criteria against the State and Last Name columns as shown below: | As the user provides criteria to various fields, that criteria can also be included in the AutoComplete query. For example, the same statement above can be performed with criteria against the State and Last Name columns as shown below: | ||
- | <code sql> | + | <code> |
select FNAME, count(*) | select FNAME, count(*) | ||
from LIST | from LIST | ||
Line 97: | Line 97: | ||
</code> | </code> | ||
- | The AutoComplete choices will be correspondingly reduced to those in the State of New York with a Last Name of Myers: | + | The AutoComplete choices and their counts will be correspondingly reduced to those in the State of New York with a Last Name of Myers: |
<code> | <code> |