Hi!
I have two tables:
-
Pessoa:
id int,
nome varchar(50),
ativo tinyint(1) -
Pessoa_Fisica:
id int,
pessoa_id int,
cpf int(11),
sexo tinyint(1),
data_nascimento date,
nome_mae varchar(50),
nome_pai varchar(50)
In Pessoa_Fisica registration form, contains all the fields mentioned above.
I must first enter the data of the Pessoa table, and then return the id of Pessoa, and then enter the data in Pessoa_Fisica.
I wonder what is the best way to perform this operation.
I’ve tried to do using the onBeforeInsert event to enter the Pessoa data, which could enter the data in that table, but the data Pessoa_Fisica table does not insert.
The strange thing is that the application does not give any error, not simply inserts the data Pessoa_Fisica table.
Someone would have any suggestions?
Thank you!