O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Result Variables

So far, you have displayed data retrieved using database queries. But sometimes you’ll need access to data about queries (and not just data within queries). For example, if you wanted to display the number of movies retrieved, where would you get that count from?

To simplify this type of operation, ColdFusion can return special variables with every query using the optional RESULT structure. Table 10.1 lists these variables, and as you can see, RecordCount can provide the number of rows retrieved.

Table 10.1. Query RESULT Variables
VariableDescription
CachedFlag indicating whether or not returned query is a cached copy
ColumnListNames of columns in query results (comma-delimited list)
ExecutionTimeQuery execution time (in milliseconds) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required