a value
to insert into the database.
I have created a list (Plist) from the form submitted,
Plist===QTY_101,QTY_102,QTY_103
Then I loop through to take out only the fields that have a value, cfloop
list=#plist# index=z
cfif evaluate(form.qty_#z#) GTE 1
cfoutput#z#-#evaluate(form.qty_#z
in the form's action page, loop through #form.fieldnames#, if the
fieldname starts with qty_ and has a value - get the prodid from field
name using removechars() or listlast() and update the db. something like
this:
cfloop list=#form.filednames# index=field
cfif left(field, 4) is QTY_ AND int(val
Swnary [EMAIL PROTECTED]
Ral DiazArgentina [EMAIL PROTECTED]
Cris Grass Uk [EMAIL PROTECTED]
CFFILE ACTION=Read
FILE=D:\INETPUB\WWWROOT\wWWROOT\ADMIN_HITTITE\file_1.txt
VARIABLE=emailtext
CFLOOP INDEX=fred
I wrote a simple email parser a while back and instead of the CHR(13) or CHR(10), I
used space as my delimiter.
Then what I did was look for the @ in each line. If the @ existed, I put it into my
list, if it didn't, I ignored that
line.
Just a suggestion
Eric
- Original Message -
FILE=D:\INETPUB\WWWROOT\wWWROOT\ADMIN_HITTITE\file_1.txt
VARIABLE=emailtext
CFLOOP INDEX=fred LIST=#ReplaceList(emailtext, , )# DELIMITERS=;
CFIF #Trim(fred)# contains @ AND #Trim(fred)# contains . AND #Trim(fred)#
IS NOT
CFSET fred1 = #Trim(fred
If you're after the emails try
cffile variable=text ...
cfset crlf = Chr(10) Chr(13)
cfoutput
cfloop list=text index=i delimiters=#crlf#
#ListLast(i, Chr(the number for tabs))#br
/cfloop
/cfoutput
This assumes tabs separate the name country and email entries.
Ade
-Original
#Chr(13)##Chr(10)# ?
- Original Message -
From: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 8:51 AM
Subject: CFLOOP, through list, delimiters help
Help,
I'm trying to extract the e-mail addresses from a text file. Here a
sample of
the text file
Make that cfloop list=#text#... instead.
Ade
-Original Message-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: 03 June 2003 17:07
To: CF-Talk
Subject: RE: CFLOOP, through list, delimiters help
If you're after the emails try
cffile variable=text ...
cfset crlf = Chr(10) Chr(13
8 matches
Mail list logo