1 2 3 4 5 6 7 8 9 10
|
/* création de ta requete de select dans TableB et assignation des valeurs récupérées dans un tableau */
$pdostatement = $pdoobject->prepare('UPDATE TableA SET champInfosComplémentaire = :tavariableaAssigner WHERE champTexte LIKE :tavariableCorrespondante');
foreach(....){ /* pour chaque élément de ton tableau */
$pdostatement->bindParam(':tavariableaAssigner', $tableau['champVille'], PDO::PARAM_STR);
$pdostatement->bindParam(':tavariableCorrespondante', $tableau['champPays'], PDO::PARAM_STR);
$pdostatement->execute();
} |