6. Defining Recordsets
Defining recordsets, which are a set of data resulting from a database query, is a key step in using dynamic data on your pages. You can use Dreamweaver to automate the query process that defines a recordset. Once you define a recordset, you can use it in Dreamweaver to add dynamic content to your pages.
A recordset can comprise data from selected rows and columns of a database table, an entire table, or a combination of data from two or more related tables. To use recordsets in Dreamweaver, you need a Web server, an application server, a database, and a database connection.
Recordsets are defined in either the Bindings panel or the Server Behaviors panel, both of which are members of the Application panel group. You can build simple recordsets, in which Dreamweaver automatically generates the SQL statements for you, or you can create more complex recordsets by writing the SQL statements from scratch or with the help of the Database Items tree, a Dreamweaver control that selects database fields and links them using the SQL SELECT, WHERE, and ORDER BY clauses.
In this chapter, you'll learn how to define simple and complex recordsets. You'll also learn how to filter and sort records using ASP, PHP, and ColdFusion. These are the three server technologies supported by Dreamweaver that share similar code and don't require object-oriented programming skills. The process of defining recordsets, including filtering and sorting, is similar for all three technologies.