User Guide

57
CHAPTER 6
Lesson 2: Writing Your First ColdFusion
Application
In this lesson, you begin the construction of a ColdFusion web application for the fictitious
company, Compass Travel. The exercises in this lesson guide you through the steps of creating
queries and forms to search for and display trip offering information from the Compass Travel
relational database.
This lesson explains how to do the following tasks:
Construct a query to retrieve information from a database.
Develop a search form to accept user criteria.
Use dynamic SQL to build a flexible search query.
Develop a results form to display the result of the search.
ColdFusion tags and functions introduced in this lesson
The following table identifies the ColdFusion tags and functions that you use in this lesson to
build your first ColdFusion application:
Element Type Description
PreserveSingleQuotes
Function Enables you to use single quotation marks in variables used in
SQL statements.
cfoutput
Tag Instructs the server to show the results of variables, functions, or
text that is specified between the
cfoutput start and end tags.
cfquery
Tag Submits SQL statements to a JDBC data source.
cfif
Tag Creates conditional statements.
cfset
Tag Defines a ColdFusion variable. If the variable already exists,
cfset resets it to the specified value.