1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <html>
<body>
<?php
$connexion=mysql_connect("localhost", "*****", "*****");
if (!$connexion) {
echo "La connexion au serveur a échouée<br>";
exit;
}
if(!mysql_select_db("*****", $connexion)) {
echo "La connexion à la base de données à échouée<br>";
exit;
}
$sql= "select titre, affiche, nomacteur, nomdistributeur, anneesortie
from films, acteurs, distributeurs
where films.numfilm=acteurs.numacteur
and films.numdistributeur=distributeurs.numdistributeur";
$interrogation=mysql_query($sql,$connexion);
mysql_close($connexion);
if ($interrogation) {
echo "<table cellpadding='5' cellspacing='45' border='5'>"
."<tr><th></th></tr>";
while ($ligne=mysql_fetch_array($interrogation, MYSQL_NUM))
echo "<tr><td>".$ligne[0]."</td></tr>";
}
else echo "La base de données ne renvoit aucune réponse";
?>
</body>
</html> |
Partager