Me again - sorry I'm a learner with this. Using PHPRunner 7.0
I am trying to add a record to another table in the "before export record" section.
I am using the following code
global $dal;
$tblEvents = $dal->Table("printed");
$tblEvents->Value["PermitID"]=$values["ID"];
$tblEvents->Value["Address"]=$values["address"];
$tblEvents->Value["Address2"]=$values["address2"];
$tblEvents->Add();
The case in this code is correct but I am getting nothing in the table.
I tried doing it with aa SQL statement too, using the manual - a straight copy and paste, modifying the field names but got a SQL statement error - the error message icluded the data I was tring to copy
I did try doing it using this code
$tblEvents = $dal->Table("printed");
$tblEvents->Value["PermitID"]=$oldvalues["ID"];
This worked for some fields but not the ID field - the structure of the fields are exactly the same except ID is auto incremented and PermitID comes from ID, but it always showed up in the printed table as zero
I guess my question is - is it possible to update another table when a batch of records are exported? If yes, then what am I doing wrong?
Any assistance appreciated