PHPRad Classic Initial 2.7.3 Forum

PHPRad Forum => Questions => Topic started by: Abes on November 19, 2021, 09:44:35 AM

Title: Master - Child Relationship
Post by: Abes on November 19, 2021, 09:44:35 AM
Hi All - please help this newbie out with something that I suspect is easy but I just cant figure how to do it.

I have a master table and child as follows, both MySQL tables:

Master
comp_id - this is an autoincrement field, unique type index, integer
..........
.........
Child
id_comp - Primary index, integer
.........
.........

When I preview the master table (List), select a record and get the popover to Add a new record to the child table I need the child table field (id_comp) to automatically inherit the value of the autoincrement field (comp_id) from the master table.
How do I do this, please?