Returns the cells of a query row as a structure
queryRowData(query, rowNumber)
→ returns struct
query.rowData(rowNumber)
Here we've a example to get the particular row value from myquery.
<cfset myQuery = queryNew("id,name,age","integer,varchar,integer",[[1,"Dharshini",20],[2,"Subash",18]])>
<cfdump var="#queryGetRow(myQuery,2)#" />
We've example to get the particular row value from myquery using script syntax.
<cfscript>
var myQuery = queryNew("id,title,author","integer,varchar,varchar",[[1,"Charlottes Web","E.B. White"],[3,"The Outsiders","S.E. Hinton"],[4,"Mieko and the Fifth Treasure","Eleanor Coerr"]]);
writeDump(myQuery.getRow(3));
</cfscript>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.