Grouping Data to Organize Output

Let's leave tables behind for a moment and look at another ColdFusion output trick that will help make your pages more readable. Look back at Figure 10.1, which illustrates the contents of the "8tracks" table in linear format. Notice that the records aren't displayed in any particular order—in fact, by default, they appear in the same order in which they were entered into the database.

You might recall that in Day 5, "Finding the Data You Need: An Introduction to Queries and SQL," I illustrated how the ORDER BY parameter could be used in an SQL query to change the display order of records. For example, if I had used the phrase ORDER BY condition in the query that created Figure 10.1, the records would have been ...

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.