Foreign Delete

Deletes all datasets from table that have their given attribute foreign key point the set that is being deleted.

Parameters:

  • table: the table to delete from
  • attribute: the attribute table that is the foreign key pointing to this table
  • message: a message that is shown only in non-trashmode before deleting the dataset
Sample Code


// create form object
$forms = new pnFormTrash("people");
$forms->edit("lastname", "firstname");
$forms->show("lastname", "firstname");

$forms->registerHandler("foreigndelete", 
    array(
        "table"=>"people", 
        "attribute"=>"color", 
        "message"=>"Colors gone, people gone."
    )
);

// create html
$forms->doit(); 

Live Sample

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.