Whatever message this page gives is out now! Go check it out!

QueryGetResult

Last update:
May 18, 2026

Description

This function retrieves metadata about a query object. The funtion returns its metadata, such as, executiontime, cache status, and recordcount key.

Returns

Struct of the query metadata.

Category

History

ColdFusion (2018 release): Introduced named parameters.
New in Adobe ColdFusion (2016 release) Update 3.

See also

Syntax

QueryGetResult(query);

Parameters

Parameter
Required/Optional
Description
query
Required
The query whose metadata is to be returned.

Example 1

<cfscript>
    myQuery = queryNew("id,name,amount","Integer,Varchar,Integer", 
                [ 
                        {id=1,name="One",amount=15}, 
                        {id=2,name="Two",amount=18}, 
                        {id=3,name="Three",amount=32} 
                ]); 
    newQuery=QueryExecute("SELECT * FROM myQuery",[],{dbtype="query"})
    myResult=QueryGetResult(newQuery)
    writeDump(myResult)
</cfscript>
Output
output

Example 2

<cfscript>
       myQuery=QueryExecute("SELECT * FROM EMPLOYEES",[],{datasource="cfdocexamples"});
       myResult=QueryGetResult(myQuery);
       WriteDump(myResult);
</cfscript>

Output

Using member function

<cfscript>
       myQuery=QueryExecute("SELECT * FROM EMPLOYEES",[],{datasource="cfdocexamples"});
       myResult=myQuery.GetResult();
       WriteDump(myResult);
</cfscript>

OUTPUT

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page