ok.
i didnt read the ENTIRE thing, but i think its still possible.
let me try...
do 1 query to get the data about the property in the db
<cftransaction>
<cfquery>
first query stuff here.
</cfquery>
<cfquery name="getlistingId">
select @@Identity from listings
</cfquery>
<cfset thisListingId = getlistingId.id>
</cftransaction>
<cfset imagesToUpload=ArrayNew(1)>
<cfloop index="i" list="imageformFields">
<!--- do the file 1 upload now --->
<cfif #form.picture1# NEQ "">
<cffile Action="upload"
Filefield="picture1"
DESTINATION="#UPpath#"
Nameconflict="makeunique" accept="image/*">
</cfif>
<cfquery>
update listings set picture#i# = '#CFFILE.ServerFile#'
where id = #thisListingId#
</cfquery>
</cfloop>
that will loop as many times as there are imageFormFields, and just do
them
in order?
tony
-----Original Message-----
From: Dave Lyons [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 10:23 PM
To: CF-Talk
Subject: Re: a naming '#CFFILE.ServerFile#' question
thanks a hole;)
ur always starting something arent u! haha
so to your reply
"huh?" lol
either way dont i still have to name the cffile.serverfile something
different for each 1?
----- Original Message -----
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2003 10:09 PM
Subject: RE: a naming '#CFFILE.ServerFile#' question
> dave.
>
> get some count of the files that you are uploading,then do a loop
> use the index var to give it a new iteration number, then make an
> array of them, you will have sequential names....and from there
> you can access them by their position in the array.
>
> :) tony (the arseholio)
>
> -----Original Message-----
> From: Dave Lyons [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 02, 2003 10:03 PM
> To: CF-Talk
> Subject: a naming '#CFFILE.ServerFile#' question
>
>
> i have this multiple file upload wich is all fine except I cant quite
> figure out what to name the 5 different '#CFFILE.ServerFile#'. I know
I
> have scene but as usually i cant find it.
> i put in the relevant code.
>
>
>
> <!--- do the file 1 upload now --->
> <cfif #form.picture1# NEQ "">
> <cffile Action="upload"
> Filefield="picture1"
> DESTINATION="#UPpath#"
> Nameconflict="makeunique" accept="image/*">
> </cfif>
>
> <!--- do the file 2 upload now --->
> <cfif #form.picture2# NEQ "">
> <cffile Action="upload"
> Filefield="picture2"
> DESTINATION="#UPpath#"
> Nameconflict="makeunique" accept="image/*">
> </cfif>
>
> <!--- do the file 3 upload now --->
> <cfif #form.picture3# NEQ "">
> <cffile Action="upload"
> Filefield="picture3"
> DESTINATION="#UPpath#"
> Nameconflict="makeunique" accept="image/*">
> </cfif>
>
> <!--- do the file 4 upload now --->
> <cfif #form.picture4# NEQ "">
> <cffile Action="upload"
> Filefield="picture4"
> DESTINATION="#UPpath#"
> Nameconflict="makeunique" accept="image/*">
> </cfif>
>
> <!--- do the file 5 upload now --->
> <cfif #form.picture5# NEQ "">
> <cffile Action="upload"
> Filefield="picture5"
> DESTINATION="#UPpath#"
> Nameconflict="makeunique" accept="image/*">
> </cfif>
>
>
> <!--- insert the contents of the form into the db --->
> <cfif isdefined ("form.submit")>
> <cfquery name="qaddlisting" datasource="#dsn#">
> INSERT INTO listings (mlsID, featured_listing, status, price, type,
> address, city, state, zip, neighborhood, complex, year, beds, baths,
> sqft, garage, basement, basementsqft, finished, stories, yard,
> yardsize, view, taxes, hoa, features1, description, picture1,
picture2,
> picture3, picture4, picture5)
> VALUES ('#form.mlsID#', '#form.featured_listing#',
'#form.status#',
> '#form.price#', '#form.type#', '#form.address#', '#form.city#',
> '#form.state#', '#form.zip#',
> '#form.neighborhood#', '#form.complex#', '#form.year#',
> '#form.beds#', '#form.baths#', '#form.sqft#', '#form.garage#',
> '#form.basement#', '#form.basementsqft#', '#form.finished#',
> '#form.stories#', '#form.yard#', '#form.yardsize#',
'#form.view#',
> '#form.taxes#', '#form.hoa#', '#form.features1#',
'#form.description#',
> '#CFFILE.ServerFile#', '#CFFILE.ServerFile#',
'#CFFILE.ServerFile#',
> '#CFFILE.ServerFile#', '#CFFILE.ServerFile#')
> </cfquery>
> </cfif>
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4