queryPrepend

Adds a query to the beginning of the current query.

queryPrepend(query1, query2) → returns query

Member Function Syntax

qry.queryPrepend(query2)

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

queryPrepend Argument Reference

query1 query
Required

The initial query object.

query2 query
Required

The query being added.

Examples sample code invoking the queryPrepend function

Add new query to the end of the current query using queryPrepend.

names = queryNew("empl_id,name", "integer,varchar", [["empl_id"=1239,"name"="John"]]);
newnames = queryNew("empl_id,name", "integer,varchar", [["empl_id"=1501,"name"="Jane"]]);
queryPrepend(names, newnames);
writeDump(names);

Fork me on GitHub