Share this Page URL

Chapter 22. Adding Dynamic Data to Your ... > Displaying Multiple Records - Pg. 761

You can also format selected dynamic data just as you would other text on a page by applying CSS styles, headings, bulleted lists, and so on. Deleting Dynamic Information Dynamic information added to a page behaves like a single object. Just click to select it. You can also drag it to another location on the page, copy and paste it, remove it from a page by selecting it and pressing the Delete key, and so on. If you remove all of the dynamic information from a page, and don't plan on using any information from the recordset, make sure you delete the recordset, too, as described on page 651. Even though you may not display any dynamic information on the page, if a page contains a recordset, it still must communicate with the database server, slow- ing down your pages. Displaying Multiple Records Often, you'll want to create a Web page that displays multiple records, such as a page that lists all of the products in your company's catalog. However, so far you've learned how to insert dynamic data only from a single record. Fortunately, Dreamweaver provides two tools for displaying multiple records: the Dy- namic Table and Repeat Region objects. Creating a Repeating Table HTML tables (see Chapter 6) were initially created to display data. The columns and rows of tables provide tidy compartments for individual pieces of information. It's not surprising, then, that in database terminology, row often refers to a single record in a database, and column indicates a single piece of information in a record. Dreamweaver's Dynamic Table tool lets you display the results of a recordset in an HTML table. The top row of the table includes the name of each database column to identify the data in the rows below. The bottom row includes dynamic data--one da- tabase column per table cell (see Figure 22-9). The magic of this tool is that it can duplicate the bottom row for each record in the recordset. In other words, the table will display multiple records, one per table row. Here's how to use it: 1. Create a recordset as described on page 636. In the Application tab of the Insert bar, click the Dynamic Table object (see Figure 22-1). You can also choose InsertApplication ObjectsDynamic Table. Either way, the Dynamic Table window opens (see Figure 22-10). 2. From the Recordset menu, choose the recordset you'd like to use. Displaying Multiple Records | 761