Returns data contained in that specific cell
queryGetCell(query, column_name [, row_number])
→ returns any
query.getCell(column_name [, row_number])
-9999
Here we've example about querygetcell. We created query using queryNew() then we got the last title column value using querygetCell. If we give row number displays the particular row title value otherwise it displays last row value.
<cfset myQuery = queryNew("id,name","integer,varchar",[[1,"Rajesh"],[2,"Anil"]])>
<cfoutput>#querygetcell(myQuery,'name')#</cfoutput>
Expected Result: Anil
Here we've the example to get particular column(title) value in script syntax
<cfscript>
var myQuery = queryNew("id,title","integer,varchar",[[1,"Charlottes Web"],[3,"The Outsiders"],[4,"Mieko and the Fifth Treasure"]]);
writeOutput(myQuery.getCell('title',2));
</cfscript>
Expected Result: The Outsiders
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.