60
Chapter 6: Lesson 2: Writing Your First ColdFusion Application
Using a web page to list trips
To help Compass Travel agents take trip reservations by telephone and in person, the trip
coordinator maintains a list of current trip offerings. Years ago, the coordinator would type the
list and fax it to the various Compass Travel offices in an effort to keep everyone informed. When
Compass Travel built an intranet accessible by all offices, the trip coordinator added the following
HTML web page to the site:
Each time the Trip List HTML page is rendered in a browser, it displays the same web page.
Since the page always shows an identical trip list, it is considered a
static
web page. You should
only use static web pages when you are creating a page that is not likely to change often.
Converting to a dynamic web page
Using the static web page approach, the Trip Coordinator needs to modify all the web pages that
reference trip lists when trips are added, deleted, or trip names are changed. This manual process
of updating each web page can lead to inaccurate or untimely information. Luckily, since
Compass Travel has built a database that contains a list of trips, you can build a more accurate
and timely solution for the trip coordinator. To accomplish this, you must understand how to
issue a SQL SELECT statement to retrieve the data from the Trips table in the Compass Travel
database.
Understanding basic SQL SELECT statements
The SQL SELECT statement retrieves columns of data from a database. The tabular result is
stored in a
result
table (called the record set).
You use the following SELECT statement to retrieve information from a table:
SELECT
column_name
(s) FROM
table_name
Содержание COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION...
Страница 1: ...Getting Started Building ColdFusion MX Applications...
Страница 6: ...6 Contents...
Страница 10: ......
Страница 30: ...30 Chapter 2 CFML Basics...
Страница 36: ...36 Chapter 3 Database Fundamentals...
Страница 48: ......
Страница 76: ...76 Chapter 6 Lesson 2 Writing Your First ColdFusion Application...
Страница 134: ...134 Index...