Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Multiple Delete From Databse and Files also

Participant ,
May 09, 2008 May 09, 2008
I am tring to remove the Images from the folders when their realted records are checked for deleteion, I want to make sure that if 2 records have been marked for deletion, The images realted to them should also get dleeted.

I tried something like this, but it did not seemed to wor, i know i am doing something wron here, but still unable to find actual way..

<cfif isdefined('form.delthisDestination')>
<cfinvoke
component="EcoLife.admin.CFC.destination"
method="ShowImage"
returnvariable="ShowImageRet"
onlyImg = "#trim(form.thisDestination)#"/>
<cfset holdrecord = ListToArray(form.thisDestination)>
<cfinvoke
component="EcoLife.admin.CFC.destination"
method="delRecords">
<cfinvokeargument name="completeList" value="#Trim(Form.thisDestination)#"/>
</cfinvoke>
<cfloop index="x" array="#holdRecord#">
<cfset holdImages = ListToArray(showImageRet.destinationImage)>
<cfoutput>
<cfif DirectoryExists("#request.file_path#\attachments\ebrochures\destinations\attachments")>
<cffile action="delete" file="#request.file_path#attachments\ebrochures\destinations\attachments\#holdImages#">
<cfelse>
</cfif>
</cfoutput>
</cfloop>
<cflocation addtoken="no" url="index.cfm?msg=3&action=#Hash(416)#">
</cfif>
TOPICS
Getting started
246
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 09, 2008 May 09, 2008
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources