myQuery["columnName"][rowNumber]

Need the column.

If you want everything in a row, something like this will give it to
you:

<cfset rowToGet=8>
<cfloop list="#myQuery.ColumnList#" index="i">
        <cfoutput>#myQuery[i][rowToGet]#</cfoutput>
</cfloop>

There's also the UDF QueryRowToStruct:
http://www.cflib.org/udf.cfm?ID=358


-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 21, 2006 3:44 PM
To: CF-Talk
Subject: accessing a specific row in a query?

Assuming I have a query named "myQuery" which returns 10 rows, how could
I get direct access to row 8? This is assuming the query will always
return the same amount of rows.

I thought it might be something like:

myQuery[8]

but that returns an error.

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238423
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to