I would like to add the id of the record I'm adding to a field in another table but am not getting any joy is this the correct way to do it? I've tried 2 ways to do it without any luck
global $dal;
$tblEvents = $dal->Table("Property_Landlord_Tenant_Link");
$tblEvents->Value["PLT_P_id"]=$values['P_id'];
$tblEvents->Add();
$sql = "INSERT INTO Property_Landlord_Tenant_Link (PLT_P_id) values ($values[P_id])";
CustomQuery($sql);
Any ideas?
I can add it when done through phpadmin using a hard-coded value
global $dal;
$tblEvents = $dal->Table("Property_Landlord_Tenant_Link");
$tblEvents->Value["PLT_P_id"]=$values['P_id'];
$tblEvents->Add();
$sql = "INSERT INTO Property_Landlord_Tenant_Link (PLT_P_id) values ($values[P_id])";
CustomQuery($sql);
Any ideas?
I can add it when done through phpadmin using a hard-coded value