Partage
  • Partager sur Facebook
  • Partager sur Twitter

tableau ajouté des lignes

css

Sujet résolu
    9 septembre 2006 à 11:19:46

    Bonjour à tous ;)

    J'ai fais un tableau à l'aide de donnée de BDD et j'aurais souhaiter mettre des sous cellules si on a plusieurs tournois

    Voivi une image pour mieux comprendre
    Image utilisateur

    Je souhaiterais obtenir une ligne entre 3 Bandes R1 et Libre R1 par exemple jusqu'à la fin car il peut y avoir 30 tournois gagnés par club.

    Le code que j'ai insérer est du code PHP


    <table><tr>
    <th>Club </th>
    <th>Nombre de tournoi gagné</th>
    <th>Liste des tournois</th>
    <th>Le vainqueur</th>
    <th>Catégorie</th>
    <th>Date du tournoi</th>
    <th>Club organisateur</th></tr>

    <?php
    mysql_connect("*****", "******", "******");
    mysql_select_db("*****");
    include("annee.php");
    $annee=$annee_determinee; //Année a changer + changer dossier

    $retour = mysql_query(" SELECT DISTINCT club FROM resultat2 ORDER BY club ASC ");
    while ($donnees = mysql_fetch_array($retour))
    {
    $club_gagnant=$donnees['club']
    ?>
    <tr>
    <td><?php echo $club_gagnant; ?></td>
    <?php
    $requete1 = "SELECT COUNT(*) FROM  resultat2 WHERE club='". $club_gagnant ."'";
    $retour1 = mysql_query($requete1);
    $reponse1 = mysql_result($retour1, 0);
    ?>
    <td><?php echo $reponse1; ?></td>
    <td>
    <?php
    /////////////////// lien du tournoi //////////////////////
    $liste_tournoi = "SELECT * FROM resultat2 WHERE club='". $club_gagnant ."'";
    $liste_tournoi2 = mysql_query($liste_tournoi);
    while ($liste_tournoi3 = mysql_fetch_array($liste_tournoi2))
    {
    $i = $liste_tournoi3['lien'];
    $type = $liste_tournoi3['type'];
    $nom_fichier= $liste_tournoi3['nom_fichier'];
    $annee2= $liste_tournoi3['donnees_binaires'];
    ?>
    <?php // On vérifie si c'est une modification de résultat ou pas
        if ($type == "tl")
        {
            // On utilise un lien normal
       
           echo '<a href="resultat/' . $annee2 . '/' . $nom_fichier . '" target="_blank">' . $i . '</a> <br>';
        }
        else
        {
           
    echo '<a style="color:#CC0000;" href="resultat/' . $annee2 . '/' . $nom_fichier . '" target="_blank">' . $i . '</a> <br>';
        } }?>
    </td>
    <td>
    <?php
    $gagnant_tournoi = "SELECT * FROM resultat2 WHERE club='". $club_gagnant ."'";
    $gagnant_tournoi2 = mysql_query($gagnant_tournoi);
    while ($gagnant_tournoi3 = mysql_fetch_array($gagnant_tournoi2))
    {
    $gagnant_tournoi4 = $gagnant_tournoi3['commentaires'];

    echo "$gagnant_tournoi4<br>"; } ?></td>

    <td>
    <?php
    $categorie_tournoi = "SELECT * FROM resultat2 WHERE club='". $club_gagnant ."'";
    $categorie_tournoi2 = mysql_query($categorie_tournoi);
    while ($categorie_tournoi3 = mysql_fetch_array($categorie_tournoi2))
    {
    $categorie_tournoi4 = $categorie_tournoi3['categorie'];

    echo "$categorie_tournoi4<br>"; } ?></td>

    <td>
    <?php
    $date_tournoi = "SELECT * FROM resultat2 WHERE club='". $club_gagnant ."'";
    $date_tournoi2 = mysql_query($date_tournoi);
    while ($date_tournoi3 = mysql_fetch_array($date_tournoi2))
    {
    $date_tournoi4 = date('d/m/Y', $date_tournoi3['timestamp']);

    echo "$date_tournoi4<br>"; } ?></td>

    <td>
    <?php
    $club_org_tournoi = "SELECT * FROM resultat2 WHERE club='". $club_gagnant ."'";
    $club_org_tournoi2 = mysql_query($club_org_tournoi);
    while ($club_org_tournoi3 = mysql_fetch_array($club_org_tournoi2))
    {
    $club_org_tournoi4 = $club_org_tournoi3['taille_fichier'];

    echo "$club_org_tournoi4<br>"; } ?></td>

    </tr>
    <?php
    } // Fin de la boucle

    ?>
    </table>


    Si quelqu'un peut m'éclairer ^^
    • Partager sur Facebook
    • Partager sur Twitter
      9 septembre 2006 à 11:29:07

      Tu aurais dû poster ta demander dans le forum php ;)
      • Partager sur Facebook
      • Partager sur Twitter
        9 septembre 2006 à 11:49:19

        j'ai trouvé merci quand meme :);)^^
        • Partager sur Facebook
        • Partager sur Twitter

        tableau ajouté des lignes

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown