QueryReverse

Description

Reverses the order of elements in a query object.

Returns

The reversed query.

Category

Syntax

QueryReverse(Object query)

Member functions

queryObject.reverse()

See also

History

ColdFusion (2018 release) Update 5: Added the function.

Parameters

Parameter

Required/Optional

Description

query

Required

The query object whose elements are to be reversed.

Example

<cfscript> 
 myquery=QueryExecute("SELECT * FROM APP.ART",[],{datasource="cfartgallery"}) 
 reversed_query=QueryReverse(myquery) 
 writeDump(reversed_query) 
</cfscript>

Member function

<cfscript> 
    myQuery=queryNew("empid,depid,name", "integer,integer,varchar",[ 
    [10, 101, "John"], 
    [20, 120, "James"], 
    [30, 205, "Peter"] 
    ]); 
    writeOutput("Original query object is:" & "<br/>") 
    writeDump(myquery) 
    reversed_query=myquery.Reverse() // reverse he query object 
    writeOutput("Reversed query object is:" & "<br/>") 
    writeDump(reversed_query) 
</cfscript>

Output

Query reverse

Get help faster and easier

New user?