I have a person table that has the name, city, and phone fields and time_id. I also have another table with a team name and in it I have a field called my_time, how can I make an INNER JOIN to register the team in that time table but in the person table in the time_id field to receive the corresponding id?
$sql = "INSERT INTO pessoa (nome, cidade, telefone) VALUES(:nome, :cidade, :telefone)";
$stmt = Parent::__construct()->prepare($sql);
$stmt->bindParam(':nome', $nome);
$stmt->bindParam(':cidade', $cidade);
$stmt->bindParam(':telefone', $telefone);
$stmt->execute()