I have a database with the following primary and foreign keys
tb_detalhe_trabalhador
id
tb_funcoes_id
tb_trabalhador_id
tb_equipamentos
id
tb_trabalhador_id
tb_funcoes
id
tb_trabalhador
id
My last table to fill is tb_equipamentos
. And give me the error:
Column tb_trabalhador_id cannot be null.
I have this field:
$sqlinsert = "INSERT INTO tb_equipamentos VALUES(0, NULL, '" . $MaquinaNumero1 . "',
This null
is tb_trabalhador_id