<cfoutput> and <cfloop> both have trouble looping over queries in 
complex data structures such as arrays.  The soluction, reference the 
array by a simple variable.

<cfset loopQuery = arr_historyItems[i]>
<cfloop query="loopQuery">
....

Ian Skinner


Protoculture wrote:

>How would I access a query inside an array for the purposes of looping over 
>that query?
>
>eg..
>               <cfloop from="1" to="#ArrayLen(arr_historyItems)#" index="i">
>               
>               <table width="95%" border="1" cellpadding="4" cellspacing="0" 
> bgcolor="#ECE9D8">
>               <tr valign="TOP">
>                       <td>Ask Price</td>
>                       <td>Sold Price</td>
>                       <td>Date Listed</td>
>                       <td>Date Sold</td>
>                       <td>Details</td>
>               </tr>
>               
>               <cfloop query="#arr_historyItems[i]#">
>               <tr>
>                       <td>dfg</td>
>                       <td>dfg</td>
>                       <td>dfg</td>
>                       <td>dfg</td>
>                       <td>dfg</td>
>               </tr>   
>               </cfloop>
>               
>               </table>
>               
>               </cfloop>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195652
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to