I need to insert data into a table from another table in the Add and Edit events.
This example involves paying owners of a crude oil well.
I have a table that contains owners data including a social security number. When I add or edit a record in a division of interst (doi) table I want the social security number from the owners table to insert into the doi file. Here is an example of the tables:
_owners
ownerid
name
addr1
addr2
city
st
zip
ssnumber
_doi
wellid
ownerid
ssnumber
doiamount
As you can see the ownerid is in both tables and when they match I want the ssnumber in the _owners table to populate the ssnumber in the _doi table.
I am very new at this and am PHP illiterate, if someone could give me an example of what the code should look like in the Add and Edit events I would be forever gratefull!!
Thank You!