Datasheet

732
Table 1-1 Employee Table
Column Name Type of Data
empid Integer
first_name 20-character string
last_name 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 in one operation. You can use the same method for all these lan-
guages. Creating both the master and detail pages at the same time is gen-
erally 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 dynamic page or open an existing one.
The page you created or open is displayed 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 display more columns on the
detail page than on the master page.
For the example in this chapter, we created an employee_records record-
set and included all the columns in the employee table (see Table 1-1).
Building Master and Detail Pages in One Operation (PHP, ASP, JSP, ColdFusion)
53_610770-bk09ch01.indd 73253_610770-bk09ch01.indd 732 5/6/10 1:20 PM5/6/10 1:20 PM