[insert_php]

$id_chanson = $_GET[‘id_chanson’];
$id_tournee = $_GET[‘id_tournee’];

$db_host = “db700583181.db.1and1.com”;
$db_user = “dbo700583181”;
$db_pass = “Acdc@1414”;
$db_database = “db700583181”;

$conn = mysqli_connect($db_host, $db_user, $db_pass, $db_database);
mysqli_set_charset($conn, “utf8”);

/* Vérification de la connexion */
if (mysqli_connect_errno()) {
printf(“Échec de la connexion : %s\n”, mysqli_connect_error());
exit();
}

$id_chanson = $conn->real_escape_string($_GET[‘id_chanson’]);
$id_tournee = $conn->real_escape_string($_GET[‘id_tournee’]);

//echo “$id_chanson”;
//echo “
“;
//echo “$id_tournee”;
//echo “
“;

$result1= (“SELECT tournee FROM tb_tournee WHERE id_tournee = ‘$id_tournee'”);
$res1 = $conn->query($result1);
$data1 = mysqli_fetch_assoc($res1);
$tournee = $data1[‘tournee’];

$result2= (“SELECT titre FROM tb_chanson WHERE id_chanson = ‘$id_chanson'”);
$res2 = $conn->query($result2);
$data2 = mysqli_fetch_assoc($res2);
$titre = $data2[‘titre’];

echo “

Détail des interprétations du titre : $titre sur la tournée $tournee.

“;

echo “

“;

$reponse_concert = (“SELECT tb_concert.id_salle, tb_salle.id_salle, tb_salle.id_ville, tb_ville.id_ville, tb_ville.id_pays, tb_pays.id_pays, tb_salle.salle, tb_ville.ville, tb_pays.pays, tb_concert.date, tb_concert.id_concert, tb_tournee.id_tournee,tb_leg.id_tournee, tb_unite.rang
FROM tb_concert, tb_salle, tb_ville, tb_pays, tb_unite, tb_leg, tb_tournee
WHERE tb_concert.id_leg=tb_leg.id_leg
AND tb_unite.id_concert=tb_concert.id_concert
AND tb_unite.id_concert=tb_concert.id_concert
AND tb_tournee.id_tournee=tb_leg.id_tournee
AND tb_concert.id_salle = tb_salle.id_salle
AND tb_salle.id_ville = tb_ville.id_ville
AND tb_ville.id_pays = tb_pays.id_pays
AND tb_unite.id_chanson= $id_chanson
AND tb_tournee.id_tournee = $id_tournee
ORDER BY tb_concert.date DESC”);

$res3 = $conn->query($reponse_concert);

while($data3 = mysqli_fetch_assoc($res3))
{
$id_concert = $data3[‘id_concert’];
$date_concert = $data3[‘date’];
$j1=substr($date_concert, 8, 2);
$m1=substr($date_concert, 5, 2);
$a1=substr($date_concert, 0, 4);
$date_concert =$j1.’/’.$m1.’/’.$a1;

$id_concert =$data3[‘id_concert’];
$ville =$data3[‘ville’];
$pays =$data3[‘pays’];
$salle =$data3[‘salle’];

$rang =$data3[‘rang’];

if($rang ==”1″)
{
$rang = “$rang ère Position”;
}
else
{
$rang = “$rang ème Position”;
}

echo “

“;
}

echo “

“;

mysqli_close($conn);
[/insert_php]