Notice: With the launch of Adobe Cookbooks, this site will no longer be accepting new entries or posting new content. Thanks to everyone who submitted content!

How do I access one row in a query?

You can access elements of a query result set with array notation:

<cfoutput>
#myQuery.columnName[5]#
</cfoutput>

This will give you the value of "columnName" in the 5th row of the record set. If you leave off the array notation, and are not within a query-based loop, than the result will be from the first row.


This question was written by Christoph Schmitz.
It was last updated on March 23, 2006 at 6:49:19 AM EST.

CFML Referenced

<cfoutput>

Categories

Queries

Comments

There are no comments for this entry.