|
Name | Default Value | Run-time Value |
tfm_navLetter | 1=1 | tfm_navLetter |
Cold
Fusion variables defined in the recordset definition dialogue box
Name | Default Value | Run-time Value |
tfm_navLetter | 1=1 | #tfm_navLetter# |
Then in your query, make sure you have a clause that uses the variable:
SELECT * FROM mytable WHERE tfm_navLetter
or
SELECT first, last, address, state FROM mytable WHERE state = 'NY' AND tfm_navLetter
The variable will also take care of the ORDER BY clause, so make sure not to include an ORDER BY clause in your SQL statement.
Navigation Letters -- Access version
This version requires that you define your own query and set your own order by clause. The procedure for applying the SB is a little different, so make sure you address the differences in the query and variables used.
The server behavior requires that you set up a recordset beforehand with a variable in place that will activate the links properly. This variable is named navLetter and should be placed in the SQL query builder like this:
ASP variables
defined in the recordset definition dialogue box
Name | Default Value | Run-time Value |
nav_Letter | A | Request.QueryString("nav_Letter") |
Cold
Fusion variables defined in the recordset definition dialogue box
Name | Default Value | Run-time Value |
nav_Letter | A | #url.nav_Letter# |
Then in your query, make sure you have a clause that uses the variable:
SELECT * FROM mytable
WHERE mycolumn LIKE 'nav_Letter%'
ORDER BY mycolumn
or
SELECT first, last, address, state
FROM mytable
WHERE state = 'NY'
AND last LIKE 'nav_Letter%'
ORDER BY last
Notice that the variable contains a percent sign to indicate a fuzzy match in the data. This allows the query to find all matches of that letter. Also, an ORDER BY clause is used that orders the data alphabetically. For the default value you can use a % instead of the letter A if you want to include all records the first time a user hits your page.
Navigation Letters -- PHP version
This version requires that you define your own query and set your own order by clause. The procedure for applying the SB is a little different, so make sure you address the differences in the query and variables used.
The server behavior requires that you set up a recordset beforehand with a variable in place that will activate the links properly. This variable is named navletter and should be placed in the SQL query builder like this:
ASP variables
defined in the recordset definition dialogue box
Name | Default Value | Run-time Value |
navletter | A | $HTTP_GET_VARS["navletter"] |
Then in your query, make sure you have a clause that uses the variable:
SELECT * FROM mytable
WHERE mycolumn LIKE 'navletter%'
ORDER BY mycolumn
or
SELECT first, last, address, state
FROM mytable
WHERE state = 'NY'
AND last LIKE 'navletter%'
ORDER BY last
Notice that the variable contains a percent sign to indicate a fuzzy match in the data. This allows the query to find all matches of that letter. Also, an ORDER BY clause is used that orders the data alphabetically. For the default value you can use a % instead of the letter A if you want to include all records the first time a user hits your page.
*(not available in JSP)