SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1170 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

Dreamweaver adds the WHERE clause. The
SQL query now reads as follows: SELECT TRIPNAME FROM LOCATIONS WHERE LOCATION_NAME.
TIP TIP
664
Incorporating Dynamic Data Part IV
6. With CITY selected, click ORDER BY.
After Dreamweaver adds the ORDER BY clause, the SQL query reads as follows: SELECT
LOCATION_NAME FROM LOCATIONS WHERE LOCATION_NAME ORDER BY CITY. You??™ve done
as much as you can with the Database Items section, and it??™s time to add the variables and
keywords.
7. In the Variables section, click the Add button and enter the following values (shown in parentheses):
n Name (varSearch): This is the name that appears in the SQL query.
n Default Value (%): The percent sign acts as a wildcard character for most databases. The
default value is inserted into the variable if no other value is entered. With a wildcard character
as a default value, if you submit the search with no criteria, all the locations in the database
are returned.
n Runtime Value (Request.Form(???searchText???)): The runtime value is submitted to the
application server and returns with whatever was entered in the form from the input field
named searchText.
That does it for the variable.
8. In the SQL text field, add the phrase LIKE ???%varSearch%??™ to the WHERE LOCATION_NAME
clause, as shown in Figure 19-15.


Pages:
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182