Ask Ben: Converting a Query to an Array

<!--- Set up the query for testing. --->
<cfset qTest = QueryNew( "id, name" ) />

<cfset QueryAddRow( qTest ) />
<cfset qTest[ "id" ][ qTest.RecordCount ] = "1" />
<cfset qTest[ "name" ][ qTest.RecordCount ] = "molly" />

<cfset QueryAddRow( qTest ) />
<cfset qTest[ "id" ][ qTest.RecordCount ] = "2" />
<cfset qTest[ "name" ][ qTest.RecordCount ] = "Sophia" />

<cfset QueryAddRow( qTest ) />
<cfset qTest[ "id" ][ qTest.RecordCount ] = "3" />
<cfset qTest[ "name" ][ qTest.RecordCount ] = "Stefie" />

<cfset QueryAddRow( qTest ) />
<cfset qTest[ "id" ][ qTest.RecordCount ] = "4" />
<cfset qTest[ "name" ][ qTest.RecordCount ] = "Maud" />

For Cut-and-Paste