jadachDevClub member 2/17/2018 | |
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
|
P
|
PaulM author 2/17/2018 |
Thanks Jadach, Make sure you are doing after record added event. Also you should use $keys['P_id'] for PK. |