At 01:05 PM 2/18/2006, Josh Nathanson wrote:

>Finally loop over the length of the array and do your inserts:
>
><cfloop from="1" to="#len(itemNamesArray)#" index="i">
><cfif isDefined("itemNamesArray[i]") AND itemRanksArray[i] NEQ "none">
><cfquery datasource="ranking_dsn">
>INSERT INTO rank_tb (itemName, itemRank)
>VALUES (#itemName[i]#, #itemRank[i]#)
></cfquery>
></cfif>
></cfloop>


Thanks for the response. In the VALUES area, shouldn't the variables 
read #itemNamesArray[i]# instead of #itemName[i]# (same for 
itemRank)? I thought we would define itemNamesArray with the CFSET so 
that we could use it in each INSERT statement...

Thanks,

Roberto  


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232802
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to