Exploring the Relationship Between Query and Output

To better understand the relationship between ColdFusion query and output sections, let's see what happens when we make some changes to the query.

In the template file illustrated in Figure 2.2, the query was very specific. Using SQL commands, it asked ColdFusion to retrieve the data from only a single record—the one in which title was 'Speedway'. To further understand ColdFusion output, look at an example where the query isn't so picky, in Figure 2.5.

Figure 2.5. A new sample template file, identical to Figure 2.2 except for the query section.

Note that the new query section uses a wildcard ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.