Save old data in another table action allows saving the old data in another table when the record is updated or deleted. This table should be a part of the project.
Available in following events:
•Edit page: Before record updated
•List page: Before record deleted
Example 1. Direct SQL query
//********** Save old data in another table ************
$sql = "INSERT INTO copy_of_cars (make, model, price) values (";
$sql .= "'".$oldvalues["make"]."',";
$sql .= "'".$oldvalues["model"]."',";
$sql .= $oldvalues["price"];
$sql .= ")";
DB::Query($sql);
See also:
•Save new data in another table
•Insert a record into another table