This function calls each row of the query provided.
void QueryEach(Object query, UDFMethod func)
Parameter | Description |
query | (Required) Query to be iterated over. |
func | (Required) Function to be called with each row of the query. |
<cfscript> qoptions = {result="myresult", datasource="cfbookclub", fetchclientinfo="yes"}; sampleQuery = QueryExecute("select * from books order by bookid", [] ,qoptions); function printQuery(any Obj){ WriteDump(Obj); } WriteOutput("QueryEach: "); QueryEach(sampleQuery, printQuery); </cfscript>