User Guide
Chapter 3
Querying a Database
This chapter describes how to retrieve data from a database, work with query data,
and enable debugging in ColdFusion applications. You will learn how to use the
ColdFusion Administrator to set up a data source and enable debugging, use the
cfquery tag to query a data source, and use the cfoutput tag to output the query
results to a Web page.
Contents
• Publishing Dynamic Data.........................................................................................18
• Understanding Database Basics ..............................................................................19
• Understanding Data Sources ...................................................................................20
• Accessing Data Sources ............................................................................................21
• Retrieving Data..........................................................................................................25
• Writing SQL................................................................................................................26
• Building Queries........................................................................................................28
• Outputting Query Data.............................................................................................30
• Getting Information About Query Results..............................................................32
• Using Query Results in Queries................................................................................34