> but how would I check to see if the result of the query contained results
or
> not,

<cfif queryname.RecordCount EQ 0>
        No results returned!
<cfelse>
        We got <cfoutput>#queryname.RecordCount#</cfoutput> row(s) back!
</cfif>

> and how would I put the results in an array,

You can loop through the query result and put them in an array.

<cfset myArray=ArrayNew(1)>
<cfloop query="queryname">
        <cfset myArray[CurrentRow]=myColumn>
</cfloop>

You can also refer to the query using array notation:
queryname[RowNumber]["ColumnName"]

But why not work with the query result directly?

> and then how would I loop through that array?

<cfloop from="1" to="#ArrayLen(myArray)#" index="i">
        <cfoutput>Element #i#: #myArray[i]#</cfoutput><br>
</cfloop>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to