Datasheet

Building Master and Detail Pages in One Operation . . .
690
Table 1-1 The Employee Table
Column Name Type of Data
empid
Integer
firstname
20 character string
lastname
20 character string
address1
25 character string
address2
25 character string
city
20 character string
state
2 character string
zip
10 character string
deptid
Integer
Building Master and Detail Pages in One
Operation (PHP, ASP, JSP, ColdFusion)
For PHP, ASP, JSP, and ColdFusion, you can build sets of master and detail
pages all in one operation. You can use the same method for all these
languages. Creating both the master and detail pages at the same time is
generally easier, but Dreamweaver gives you the flexibility of creating them
separately, too.
To create a master and detail page set for PHP, ASP, JSP, or ColdFusion,
follow these steps:
1. Create a new or open an existing dynamic page.
A blank page opens in Dreamweaver; this page becomes your master
page in the language that you selected.
2. Define a recordset for the page.
For the lowdown on creating a recordset, check out Book VIII, Chapter 1.
The recordset provides the data that’s displayed on both the master
and detail pages. Make sure that you include all the table columns that
you need to create your master page, including the unique key (the
record ID column) for each record and all the table columns that you
need to create your detail page. Typically, you show more columns on
the detail page than on the master page.
For the example in this chapter, we created an employee_records
recordset and included all the columns in the employee table (see
Table 1-1).