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 1171 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

The LIKE operator compares two text values; and the variable
is put in quotes with wildcard characters, the percent sign, on either side. This use of wildcards
ensures that the entire data string is compared against the search criteria. Without them, only
exact matches would return results. Click OK to add the recordset to your page.
Keywords in SQL, such as SELECT, FROM, and LIKE, are often uppercased to distinguish them
from field names and other code, although you are not required to do so.
FIGURE 19-15
The LIKE operator, not available in the simple Recordset dialog box, is essential for constructing database searches.
NOTE NOTE
665
Establishing Connections and Recordsets 19
An alternative approach to the method just described is to work out the SQL in advance and enter it
directly into the SQL area without using the Database Items area at all. The only other element that you
include is the variable. Which approach should you use? If you need to include complicated field names, I
recommend using the point-and-click method to avoid typos. This method is also useful when you are
using columns from different tables that have the same name; in this situation, Dreamweaver prepends the
table name followed by a period, as follows: LOCATIONS.LOCATION_NAME.


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