Foo.title[1]
This is unlike how recordsets work in JSP/JSTL. CF recordsets are a
collection of columns, with each column's rows indexable by record number.
JSTL recordsets are an array (white lie) of record objects indexable by
record number, with each object having a field per column.
Personally, I think CF's view is the "wrong" one, as there should be more
cohesion between columns of a record than between fields of a column, but
it's a minor point that doesn't really matter.
Cheers,
barneyb
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 20, 2004 1:28 PM
> To: CF-Talk
> Subject: Accessing query results by row number
>
> Is there a way to access query results by referencing the record's row
> number? I've tried
>
> foo[1].Title
>
> to get the Title field in row 1 of my query named foo, but I
> get this error
>
> [Table (rows 1 columns TITLE): [TITLE:
> [EMAIL PROTECTED] ]
> is not indexable by 1
>
> I know I can loop through the query results with <cfloop> and
> set a start
> and an end record, and I can make that work for what I'm
> doing, but it would
> be a pain.
>
> Thanks for any help!
>
> Nancy P. Tracy
> Electrical Design and Web Development
> GE Global Controls Services
> 3800 N. Wilson Ave.
> Loveland, CO 80538
> 970.461.5273
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

