Its a cute trick, but probably fails against something internal to the CFINSERT tag. Once the tag 'views' the form fields as containing afghanistan (the first time), it caches it for future use. That seems to be what's going on. Might as well just use real SQL for this.
> It correctly outputs unique countries per line but only inserts > "AFGHANISTAN" repeatedly into the database table. Why? > > <cfset Countries="AFGHANISTAN,ALBANIA,ALGERIA,AMERICAN .... > > <cfoutput> > <cfloop index="CountriesList" list="#Countries#" delimiters=","> > <cfset Form.CountryName=#CountriesList#> > <p>#Form.CountryName#</p> > <cfinsert datasource="Countries" tablename="Form_Countries" > formfields="CountryName"> > </cfloop> > </cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

