hi.. i'm trying to use CFFile READ to get a list of info.. and then insert them into
database. anyone try it b4?
i tried doing it but hav error... coz when i append list to array.. it cant recognise
a new line... so.. it append the last field of line 1 with 1st field of line 2 as
one...
eg of list--> read.txt
"name1", "phone", "address"
"name2, "phone", "address"
"name3", "phone", "address"
"name4, "phone", "address"
heres my codes:
<CFFILE ACTION="Read" FILE="user.txt" VARIABLE="Message">
<CFSET myArrayList = ListToArray(Message,",")>
<body>
<cfoutput>
<cfloop index="myloop" from="1" to="#ArrayLen(myArrayList)#" step="3">
#myArrayList[myloop]#
#myArrayList[myloop+1]#
#myArrayList[myloop+2]#
<br>
</cfloop>
</cfoutput>
anyway i can solve this prob?
or is there a better way i can insert to database?
cheers
han
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists