Tuesday, March 08, 2005

Coldfusion Delete

When I add a record, the action page displays the variable values for the new record. However, I have an action page that deletes a record. Since the record is deleted, how do I inform the user of the delete form that he just deleted Employee XYZ?

Before you delete the value, query it and store the name in a variable.

<cfquery name="emplname">
select employee_name from employees where id = 12345678
</cfquery>

<cfquery...>
delete from employees where id = 12345678
</cfquery>

Then after you delete it, simply <cfoutput>#emplname.employee_name#</cfoutput>

0 Comments:

Post a Comment

<< Home