Displaying Multiple Records
Often, you’ll want to create a web page that displays multiple records, such as a page that lists all the products in your company’s catalog.
So far, the techniques you learned for inserting dynamic data insert information from only a single record. Even if you created a recordset that retrieves a thousand records, you still just see information from the very first record in the recordset when you simply drag data from the Bindings panel onto a dynamic Web page. You need a bit of extra programming if you want to see information from more than one record (like a long list of all company employees) on a single page. Fortunately, Dreamweaver gives you two tools to display multiple records: the Dynamic Table and Repeat Region objects.
Creating a Repeating Table
You use HTML tables (see Chapter 7) to display data. The columns and rows 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 type of information in a record. Where a row and column meet, they form a “cell” that holds one piece of data from a single record.
Dreamweaver’s Dynamic Table tool lets you display the results of a recordset in an HTML table. When you insert a dynamic table, it consists of two rows. The top row displays the name of each database column so you can identify the data in the rows below. The bottom row includes the code for the actual ...