I'm trying to update a table with foreign keys, just in foreign keys I want to leave them with value NULL
when doing update but I'm not getting this is my query:
$sql = 'UPDATE agenda SET id_pessoa=:id_pessoa ,id_tp_pessoa=:id_tp_pessoa ';
$sql .= 'WHERE id_agenda = :id_agenda';
$stm = $conexao->prepare($sql);
$stm->bindValue(':id_pessoa', $id_pessoa);
$stm->bindValue(':id_tp_pessoa', $id_tp_pessoa);
$stm->bindValue(':id_agenda', $id_agenda);
$retorno = $stm->execute();