|
Before deleting a record in the Orders table check for related
items in the OrderDetails table. Add the following code to the
List page: Before record deleted
event.
Note: Change the values listed in
red to match your specific needs.
// Parameters:
// where - string with WHERE clause pointing to record to be deleted.
global $dal;
$rs = $dal->OrderDetails->Query("OrderID=".$deleted_values["OrderID"],"");
$data = db_fetch_array($rs);
if($data)
return false;
else
return true;
|
|