I'm having trouble inserting data that has related tables.
$sqlinsert2 = "INSERT INTO tb_detalhe_trabalhador VALUES(0,NULL,NULL,'".$MedicaValidade."',..
Currently the data that is NULL is the fields related to the Table.
tb_detail_worker:
'id' int(11) NOT NULL AUTO_INCREMENT,
'tb_trabalhador_id' int(11) DEFAULT NULL,
'tb_funcoes_id' int(11) DEFAULT NULL,
'MedicaValidade' date DEFAULT NULL,
'MedicaAnexo' longblob,
(...)