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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| <?php
// lancement de la requête
$sql = '
SELECT AL.idserie
, AL.idalbum
, AL.num
, AL.numa
, AL.titre
, AL.idscenariste
, AL.editeur
, AL.collection
, AL.edo
, AL.perso1
, AL.perso2
, AL.perso3
, AL.format
, AL.dateachat
, AL.coteactuelle
, AL.dl
, AL.nbpages
, AL.reference
, AL.integrale
, AL.horsserie
, AL.editionlimitee
, AL.broche
, AL.perso4
, AL.commentaire
, AL.couverture
, SC.nom
, SC.prenom
, SC.pseudo
, DE.nom
, DE.prenom
, DE.pseudo
, CO.nom
, CO.prenom
, CO.pseudo
FROM albums AS AL
INNER JOIN auteurs AS SC
ON SC.idauteur = AL.idscenariste
INNER JOIN auteurs AS DE
ON DE.idauteur = AL.idscenariste
INNER JOIN auteurs AS CO
ON CO.idauteur = AL.idscenariste
WHERE AL.idserie=590';
// Lancement de la requête (mysql_query)
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
// Scan des tuples un par un
while ($data = mysql_fetch_array($req))
{
// Affichage
echo 'Tome '.$data['num'].' ';
echo ' '.$data['numa'].' : ';
echo ''.$data['titre'].'<br />';
echo 'Scenario : '.$data['SC.nom'].'';
echo ' '.$data['SC.prenom'].'';
echo ' ('.$data['SC.pseudo'].')<br />';
echo 'Dessins : '.$data['DE.nom'].'';
echo ' '.$data['DE.prenom'].'';
echo ' ('.$data['DE.pseudo'].')<br />';
echo 'Couleurs : '.$data['CO.nom'].'';
echo ' '.$data['CO.prenom'].'';
echo ' ('.$data['CO.pseudo'].')<br /><br />';
}
mysql_free_result ($req);
mysql_close ();
?> |
Partager