User Guide
C HAPTER 3
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................................................................................ 16
• Database Basics................................................................................................ 16
• Understanding Data Sources .......................................................................... 18
• Adding Data Sources........................................................................................ 19
• Retrieving Data................................................................................................. 20
• Writing SQL....................................................................................................... 21
• Building Queries............................................................................................... 24
• Outputting Query Data.................................................................................... 25
• Getting Information About Query Results ..................................................... 27