Hi all,

I ran into a big problem this morning when I found out that all the data
from my table were somehow deleted.  I wanted to make sure that it wasn't my
code so I did an extended search for "delete from tablename" and "delete
tablename" in my code and I'm positive that there is only one instance that
I do a delete from this table.  I had this happen a long while ago to the
same exact table.  Here is my delete page, any ideas on how this could've
happened would be greatly appreciated.


<CFQUERY NAME="getTenantCoding" DATASOURCE="#rentDSN#">
        SELECT CItem
        FROM CodeOfUnits
        WHERE CItem=#CItem# AND UnitNo='#UnitNo#'
</CFQUERY>

<CFIF getTenantCoding.recordCount GT "1">

        <CFQUERY NAME="deleteTenatCoding" DATASOURCE="#rentDSN#">
                DELETE CodeOfUnits
                WHERE UnitNo='#UnitNo#' AND CItem=#CItem#
        </CFQUERY>
        
        <CFSET notice="Tenant info has successfully been deleted!">

<CFELSE>

        <CFQUERY NAME="deleteTenatCoding" DATASOURCE="#rentDSN#">
                DELETE CodeOfUnits
                WHERE UnitNo='#UnitNo#' AND CItem=#CItem#
        </CFQUERY>

        <CFQUERY NAME="deleteTenant" DATASOURCE="#rentDSN#">
                DELETE Tenant
                WHERE CImproveNo=#caseNo# AND UnitNo='#UnitNo#'
        </CFQUERY>
        
        <CFSET notice="Tenant info has successfully been deleted!">

</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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to