Hi!
I used a CFQUERY to UPDATE a table and it works fine,
but I can't get it to work with an INSERT INTO.
I use the UPDATE instead of CFUPDATE beucause
of the loop. I couldn't get it to work at all with CFUPDATE.
Here it is:
<CFquery datasource="CSM">
INSERT INTO Projects(ProjectID,ID,Done<cfloop
query="lang">,'Description#lang.abrev#','Details#lang.Abrev#',</cfloop>Image
,FormatImage)
VALUES('#ProjectID#','#ID#','#Done#'
<cfloop query="lang">
<CFSET tempdesc=evaluate("Description#lang.Abrev#")>
<CFSET tempdet=evaluate("details#lang.Abrev#")>
,'#tempdesc# ','#tempdet# ',</cfloop>
Image='#Image#',
FormatImage='#formatImage#')
</cfquery>
Here is the working UPDATE:
<CFQUERY datasource="CSM">
UPDATE Projects
SET
<cfloop query="lang">
<CFSET tempdesc=evaluate("Description#lang.Abrev#")>
<CFSET tempdet=evaluate("details#lang.Abrev#")>
Description#lang.Abrev#='#tempdesc# ',
Details#lang.Abrev#='#tempdet# ',
</cfloop>
Done=#Done#,
Image='#Image#',
FormatImage='#formatImage#'
WHERE ProjectID=#FORM.ProjectID#
</cfquery>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.