|
Mailing Lists
|
Home / Groups / ColdFusion Talk (CF-Talk)
CSV loopSo right now you have.. .... <cffile ...> <cfoutput>Hello</cfoutput> And you are saying the Hello doesn't show? And it's ABOVE the cfloop? ======================================================================= Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Email : jedimaster@mindseye.com WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > HOLY CANNOLI - CFDUMP on the file - zip, nada, nothin... I > put the word > HELLO on the page after the CFFILE, and it doesnt show - put > it up above, > and it does! So it's not my query???? > > At 03:28 PM 1/29/03 -0600, you wrote: > >Ah - you should check and see if read_file is empty first - > before your > >cfloop, do a dump on that. Make sure you are actually > looping. Or you > >can also add debug statements in your cfloop tags.. > > > ><cfoutput>Going over a line, the line is #line#, enjoy<p></cfoutput> > > > >============================================================= > ========== > >Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > > > >Email : jedimaster@mindseye.com > >WWW : www.camdenfamily.com/morpheus > >Yahoo IM : morpheus > > > >"My ally is the Force, and a powerful ally it is." - Yoda > > > > > Ray, > > > > > > Thanks so much for guiding me through all this - it's quite > > > frustrating... > > > > > > OK, so how do I implement it? I tried the code below, > and again, it > > > comes up with a blank... > > > > > > <cfset delims=","> > > > <cfset numcols="3"> > > > <CFOUTPUT>#Delims#</CFOUTPUT> > > > <!--- read the file --> > > > <cffile > > > action=read > > > > > > file="c:\inetpub\wwwroot\briona\secure\modernstorage\shop\cont > > > rol\QuantumModify.csv" > > > variable="read_file"> > > > > > > <cfloop index="line" list="#read_file#" delimiters="#chr(13)#"> > > > <!--- loop through the columns --> > > > <cfloop from="1" to="#numcols#" index="num"> > > > <cfquery name="update_file" datasource="ModernStorageECom"> > > > UPDATE Products > > > SET > > > JPG = '#listgetAt('#line#',2, ',')#"', > > > PDF = '#listgetAt('#line#',3, ',')#"' > > > where (MFGPartNumber = '#listgetAt('#line#',1, ',')#"') > > > </cfquery> > > > </cfloop> > > > </cfloop> > > > > > > <CFDUMP var="#update_file#"> > > > > > > > > > > > > |
May 24, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||