I have this code to receive data in two different tables. But only the first table is receiving data. The second remains blank. Can this code work this way?
if(($query=mysql_query($sqlinsert)) and ($query2=mysql_query($sqlinsert2))){
$sqlinsert = "INSERT INTO tb_funcoes VALUES(0,'"....)";
$sqlinsert2 = "INSERT INTO tb_detalhe_trabalhador VALUES(0,NULL,NULL,'o."',....)";
}
When the error occurs, it returns the following message:
Duplicate entry '0' for key 'PRIMARY'