Access Specific Query Rows and Columns Directly

For rapid access to specific query rows and columns, access them as if they were structures and arrays. You can refer to a specific column of a specific row as #query.column[row]#. For example, if you wanted the “price” column for the fifth row of a query named “products” you could use the expression #products.price[5]#. This technique is especially useful when looping through query results to perform some processing. (Applies to: ColdFusion 3 (or later))

Leave a Reply