|
To update two joined
tables use the following code in Add
page: Before record added and/or Edit page: Before record updated
events.
Note: Change the values listed in
red to match your specific needs.
global $conn;
$sql = "update othertable set joinedfield=".$values["joinedfield"]." ... ";
db_exec($sql,$conn);
unset($values["joinedfield"]);
|
To update master and details
tables use the following code for details table in Add
page: Before record added and/or Edit page: Before record updated
events.
global $dal;
$dal->DetailTableName->Value["Field1"] = $values["Field1"];
$dal->DetailTableName->Param["OrderID"] = $values["OrderID"];
$dat->DetailTableName->Update();
unset($values["Field1"]);
|
Field1 is a field in the detail table
and OrderID is the linked
field in the master table.
|