macromedia.coldfusion.advanced_techniques
[Top] [All Lists]

Re: Deleting a record and the uploaded file problem

Subject: Re: Deleting a record and the uploaded file problem
From: "paross1"
Date: Tue, 4 Dec 2007 18:18:25 +0000 UTC
Newsgroups: macromedia.coldfusion.advanced_techniques

Something like this....

 <cfquery name="deleteFile" datasource="#sitedatasource#" 
username="#siteUserID#" password="#sitePassword#">
 SELECT feature.title, feature.Body, feature.MYFile 
 FROM feature
 WHERE feature.id = <cfqueryparam cfsqltype="cf_sql_char" value="#form.id#">
 </cfquery>

 <cfquery name="DeleteRecord" dataSource="#sitedatasource#" maxRows=1>
 DELETE
 FROM feature
 WHERE feature.id = <cfqueryparam cfsqltype="cf_sql_char" value="#form.id#">
 </cfquery>

 <cffile action="delete" destination="c:/websites/x9vdzd/img/feature" 
file="#deleteFile.MYFile#">



<Prev in Thread] Current Thread [Next in Thread>