Returns data contained in that specific cell

queryGetCell(query, column_name [, row_number]) → returns any

Member Function Syntax

query.getCell(column_name [, row_number])

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

queryGetCell Argument Reference

query query

column_name string

row_number numeric
Default: -9999

Examples sample code invoking the queryGetCell function

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"]])>

Expected Result: Anil

Here we've the example to get particular column(title) value in script syntax

var myQuery = queryNew("id,title","integer,varchar",[[1,"Charlottes Web"],[3,"The Outsiders"],[4,"Mieko and the Fifth Treasure"]]);

Expected Result: The Outsiders

Fork me on GitHub