Skip to content

Instantly share code, notes, and snippets.

@acotie
Created March 5, 2010 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acotie/322509 to your computer and use it in GitHub Desktop.
Save acotie/322509 to your computer and use it in GitHub Desktop.
<cffunction name="query2array" access="public" output="false" returntype="array" displayname="query2array" hint="query2array (Values only)">
<cfargument name="Querys" type="query" required="yes" />
<cfset var aResults = arrayNew(1)>
<cfloop from="1" to="#arguments.Querys.recordCount#" index="i">
<cfloop list="#arguments.Querys.columnList#" index="columnName">
<cfset aResults[i] = arguments.Querys[columnName][i]>
</cfloop>
</cfloop>
<cfreturn aResults />
</cffunction>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment