Can I get a query row by index in ColdFusion?
问题 I want to get a specific row in a ColdFusion Query object without looping over it. I'd like to do something like this: <cfquery name="QueryName" datasource="ds"> SELECT * FROM tablename </cfquery> <cfset x = QueryName[5]> But it's giving me an error saying that the query isn't indexable by "5". I know for a fact that there are more than 5 records in this query. 回答1: You can't get a row in CF <= 10. You have to get a specific column. <cfset x = QueryName.columnName[5]> It's been 8 years since