#file.serverfile# can only contain one value at a time. So your code will
write the value for excfile into both fields in the db. Instead, do a
cffile, then assign the file.serverfile to another variable, then do your
next cffile, and so on.
Ex:
<cffile action="UPLOAD" formfield="resfile" filefield="resfile"
destination="#session.respath#" nameconflict="MAKEUNIQUE">
<cfset resfilename = File.ServerFile>
<cffile action="UPLOAD" formfield="excfile" filefield="excfile"
destination="#session.respath#" nameconflict="MAKEUNIQUE">
<cfset excfilename = File.ServerFile>
<CFQUERY>
INSERT INTO table
(resFile, excfile)
VALUES
(''#resfilename#', '#excfilename#')
</CFQUERY>
----- Original Message -----
From: "THERESA" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 04, 2000 3:02 AM
Subject: uploading multiple files
> > I am uploading 2 files and am using the makeunique function for
> > naming.
> >
> > The problem I am having is when I write the name of the files to the
> > db, I want to use the names given if they were made unique, so I am
> > using this: '#File.ServerFile#'
> >
> > The problem is that it's putting the same name in both fields of the
> > db. How do I specify for it to put in the name it gave each file.
> >
> > Below is my insert statement and upload.
> >
> > Thanks in Advance.
> >
> > tcl
> >
> > <cffile action="UPLOAD" formfield="resfile" filefield="resfile"
> > destination="#session.respath#" nameconflict="MAKEUNIQUE">
> >
> > <cffile action="UPLOAD" formfield="excfile" filefield="excfile"
> > destination="#session.respath#" nameconflict="MAKEUNIQUE">
> >
> > <CFQUERY>
> > INSERT INTO table
> > (resFile, excfile)
> > VALUES
> > (''#File.ServerFile#', '#File.ServerFile#')
> > </CFQUERY>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.