That's the problem.
I have many books.
CFMXWACK, CFMXAWACH, Mastering ColdFusion MX, The Complete Reference
ColdFusion MX, The Complete Reference Dreamweaver MX, The Complete Reference
Flash MX ActionScript, Flash MX Savvy, The Complete Reference SQL, Fusebox:
Developing ColdeFusion Applications, ColdFusion MX with Dreamweaver MX,
Flash MX training from the source, Reality ColdFusion MX and Flash MX and
more (with the ColdFusion MX Bible on the way).
Sometimes it's difficult to find the info you need and the DWMX context help
isn't anywhere near what Studio 5 offers.
==
Peter Tilbrook
Internet Applications Developer
Australian Building Codes Board
GPO Box 9839
CANBERRA ACT 2601
AUSTRALIA
WWW: http://www.abcb.gov.au/
E-Mail: [EMAIL PROTECTED]
Telephone: +61 (02) 6213 6731
Mobile: 0439 401 823
Facsimile: +61 (02) 6213 7287
-----Original Message-----
From: Joe Eugene [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 25 February 2003 4:23 PM
To: CF-Talk
Subject: RE: Problem with list loop
Am glad it worked for you.. try to grab a SQL book for the weekend:).
Joe Eugene
> -----Original Message-----
> From: Tilbrook, Peter [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 11:59 PM
> To: CF-Talk
> Subject: RE: Problem with list loop
>
>
> This code (finally) worked :)
>
> <cfoutput>
> <cfloop index="i" from="1" to="#listLen(Countries,",")#">
> <cfset Form.CountryName=#i#>
> <p>#ListGetAt(Countries,i,",")#</p>
> <cfquery datasource="Countries" timeout="30">
> insert into Form_Countries (CountryName)
> values('#listGetAt(Countries,i,",")#');
> </cfquery>
> </cfloop>
> </cfoutput>
>
> Thanks for pointing me in the right direction. Thanks also to Mastering
> ColdFusion MX :)
>
> ==
> Peter Tilbrook
> Internet Applications Developer
> Australian Building Codes Board
> GPO Box 9839
> CANBERRA ACT 2601
> AUSTRALIA
>
> WWW: http://www.abcb.gov.au/
> E-Mail: [EMAIL PROTECTED]
> Telephone: +61 (02) 6213 6731
> Mobile: 0439 401 823
> Facsimile: +61 (02) 6213 7287
>
> -----Original Message-----
> From: Joe Eugene [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 25 February 2003 3:26 PM
> To: CF-Talk
> Subject: RE: Problem with list loop
>
>
> This should work..
>
> <cfoutput>
> <cfloop index="i" from="1" to="#listLen(Countries,",")#">
> <!--- am not sure why you want to do cfinsert..why not just insert--->
>
> <cfquery name="" datasource="" timeout="30">
> insert into tableName values('#listGetAt(Countries,i,",")#');
> </cfquery>
>
> </cfloop>
> </cfoutput>
>
> Joe Eugene
>
>
>
> > -----Original Message-----
> > From: Tilbrook, Peter [mailto:[EMAIL PROTECTED]
> > Sent: Monday, February 24, 2003 9:19 PM
> > To: CF-Talk
> > Subject: Problem with list loop
> >
> >
> > It correctly outputs unique countries per line but only inserts
> > "AFGHANISTAN" repeatedly into the database table. Why?
> >
> > <cfset Countries="AFGHANISTAN,ALBANIA,ALGERIA,AMERICAN
> > SAMOA,ANDORRA,ANGOLA,ANGUILLA,ANTARCTICA,ANTIGUA AND
> > BARBUDA,ARGENTINA,ARMENIA,ARUBA,AUSTRALIA,AUSTRIA,AZERBAIJAN,BAHAM
> > AS,BAHRAIN
> > ,BANGLADESH,BARBADOS,BELARUS,BELGIUM,BELIZE,BENIN,BERMUDA,BHUTAN,B
> > OLIVIA,BOS
> > NIA AND HERZEGOVINA,BOTSWANA,BOUVET ISLAND,BRAZIL,BRITISH INDIAN OCEAN
> > TERRITORY,BRUNEI DARUSSALAM,BULGARIA,BURKINA
> > FASO,BURUNDI,CAMBODIA,CAMEROON,CANADA,CAPE VERDE,CAYMAN ISLANDS,CENTRAL
> > AFRICAN REPUBLIC,CHAD,CHILE,CHINA,CHRISTMAS ISLAND,COCOS (KEELING)
> > ISLANDS,COLOMBIA,COMOROS,CONGO,THE DEMOCRATIC REPUBLIC OF THE CONGO,COOK
> > ISLANDS,COSTA RICA,C�TE D'IVOIRE,CROATIA,CUBA,CYPRUS,CZECH
> > REPUBLIC,DENMARK,DJIBOUTI,DOMINICA,DOMINICAN REPUBLIC,EAST
> > TIMOR,ECUADOR,EGYPT,EL SALVADOR,EQUATORIAL
> > GUINEA,ERITREA,ESTONIA,ETHIOPIA,FALKLAND ISLANDS (MALVINAS),FAROE
> > ISLANDS,FIJI,FINLAND,FRANCE,FRENCH GUIANA,FRENCH
> POLYNESIA,FRENCH SOUTHERN
> > TERRITORIES,GABON,GAMBIA,GEORGIA,GERMANY,GHANA,GIBRALTAR,GREECE,GR
> > EENLAND,GR
> > ENADA,GUADELOUPE,GUAM,GUATEMALA,GUINEA,GUINEA-BISSAU,GUYANA,HAITI,HEARD
> > ISLAND AND MCDONALD ISLANDS,HOLY SEE (VATICAN CITY STATE),HONDURAS,HONG
> > KONG,HUNGARY,ICELAND,INDIA,INDONESIA,ISLAMIC REPUBLIC OF
> > IRAN,IRAQ,IRELAND,ISRAEL,ITALY,JAMAICA,JAPAN,JORDAN,KAZAKSTAN,KENY
> > A,KIRIBATI
> > ,DEMOCRATIC PEOPLE'S REPUBLIC OF KOREA,REPUBLIC OF
> > KOREA,KUWAIT,KYRGYZSTAN,LAO PEOPLE'S DEMOCRATIC
> > REPUBLIC,LATVIA,LEBANON,LESOTHO,LIBERIA,LIBYAN ARAB
> > JAMAHIRIYA,LIECHTENSTEIN,LITHUANIA,LUXEMBOURG,MACAU,THE FORMER YUGOSLAV
> > REPUBLIC OF
> > MACEDONIA,MADAGASCAR,MALAWI,MALAYSIA,MALDIVES,MALI,MALTA,MARSHALL
> >
> ISLANDS,MARTINIQUE,MAURITANIA,MAURITIUS,MAYOTTE,MEXICO,FEDERATED STATES OF
> > MICRONESIA,REPUBLIC OF
> > MOLDOVA,MONACO,MONGOLIA,MONTSERRAT,MOROCCO,MOZAMBIQUE,MYANMAR,NAMI
> > BIA,NAURU,
> > NEPAL,NETHERLANDS,NETHERLANDS ANTILLES,NEW CALEDONIA,NEW
> > ZEALAND,NICARAGUA,NIGER,NIGERIA,NIUE,NORFOLK ISLAND,NORTHERN MARIANA
> > ISLANDS,NORWAY,OMAN,PAKISTAN,PALAU,OCCUPIED PALESTINIAN
> > TERRITORY,PANAMA,PAPUA NEW
> > GUINEA,PARAGUAY,PERU,PHILIPPINES,PITCAIRN,POLAND,PORTUGAL,PUERTO
> > RICO,QATAR,R�UNION,ROMANIA,RUSSIAN FEDERATION,RWANDA,SAINT HELENA,SAINT
> > KITTS AND NEIS,SAINT LUCIA,SAINT PIERRE AND MIQUELON,SAINT
> VINCENT AND THE
> > GRENADINES,SAMOA,SAN MARINO,SAO TOME AND PRINCIPE,SAUDI
> > ARABIA,SENEGAL,SEYCHELLES,SIERRA
> LEONE,SINGAPORE,SLOVAKIA,SLOVENIA,SOLOMON
> > ISLANDS,SOMALIA,SOUTH AFRICA,SOUTH GEORGIA AND THE SOUTH SANDWICH
> > ISLANDS,SPAIN,SRI LANKA,SUDAN,SURINAME,SVALBARD AND JAN MAYEN,SWAZILAND,
> > SWEDEN,SWITZERLAND,SYRIAN ARAB REPUBLIC,TAIWAN PROVINCE OF
> > CHINA,TAJIKISTAN,UNITED REPUBLIC OF
> > TANZANIA,THAILAND,TOGO,TOKELAU,TONGA,TRINIDAD AND
> > TOBAGO,TUNISIA,TURKEY,TURKMENISTAN,TURKS AND CAICOS
> > ISLANDS,TUVALU,UGANDA,UKRAINE,UNITED ARAB EMIRATES,UNITED KINGDOM,UNITED
> > STATES,UNITED STATES MINOR OUTLYING
> > ISLANDS,URUGUAY,UZBEKISTAN,VANUATU,VENEZUELA,VIET NAM,BRITISH VIRGIN
> > ISLANDS,U.S. VIRGIN ISLANDS,WALLIS AND FUTUNA,WESTERN
> > SAHARA,YEMEN,YUGOSLAVIA,ZAMBIA,ZIMBABWE">
> >
> > <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>
> >
> > ==
> > Peter Tilbrook
> > Internet Applications Developer
> > Australian Building Codes Board
> > GPO Box 9839
> > CANBERRA ACT 2601
> > AUSTRALIA
> >
> > WWW: http://www.abcb.gov.au/
> > E-Mail: [EMAIL PROTECTED]
> > Telephone: +61 (02) 6213 6731
> > Mobile: 0439 401 823
> > Facsimile: +61 (02) 6213 7287
> >
> >
> > **********************************************************************
> > The information contained in this e-mail, and any attachments to it, is
> > intended for the use of addressee and is confidential. If you are not
> > the intended recipient, you must not use, disclose, read,
> forward, copy or
> > retain any of the information. If you have received this e-mail in
> > error, please delete it and notify the sender by return e-mail or
> > telephone.
> > The Commonwealth does not warrant that any attachments are free from
> > viruses or any other defects. You assume all liability for any
> > loss, damage, or
> > other consequences which may arise from opening or using the
> attachments.
> >
> > **********************************************************************
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4