Webmaster Hub: Faire un tableau avec des données de table - Webmaster Hub

Aller au contenu

Page 1 sur 1
  • Vous ne pouvez pas commencer un sujet
  • Vous ne pouvez pas répondre à ce sujet

Faire un tableau avec des données de table Oui encore besoin d'aide lol ! Noter : -----

#1 L'utilisateur est hors-ligne   Total Manager 

  • Groupe : Membre
  • Messages : 60
  • Inscrit(e) : 10-juin 04
  • Genre:Homme
  • Localisation:Eygalières en Pce

Posté 17 juillet 2004 - 20:33

Voici le code , le seul blem c'est qu'il me raffiche la premiere ligne du tableau que je ne veut pas à chaque fois comment faire svp :)

<?
include ('secure.php');
$team =$_SESSION['club'];
require_once("fonctions.php");
connecting();
print'<div align="center"><img src="clubs/'.$_SESSION['club'].'.gif">';
$r=mysql_query ("SELECT * FROM joueurs WHERE club ='$team' ");
$nb=mysql_num_rows($r);
$i=0;
while($tableau=mysql_fetch_array($r) )
{
    print'<div align="center"><table border>
    <tr>
        <td width="136" height="18"><p>Joueur</td>
        <td width="62" height="18"><p>Poste</td>
        <td width="90" height="18"><p>Gardien</td>
        <td width="68" height="18"><p>Defense</td>
        <td width="96" height="18"><p>Attaque</td>
    </tr>
<tr>
        <td width="136" height="18"><p><a href="?page=option_joueur&id='.$tableau[id].'">'.$tableau[
nom].' 
            '.$tab[prenom].'</a></td>
        <td width="62" height="18"><p>'.$tableau[poste].'</td>
        <td width="90" height="18"><p>'.$tableau[gardien].'</td>
        <td width="68" height="18"><p>'.$tableau[defense].'</td>
        <td width="96" height="18"><p>'.$tableau[attaque].'</td>
    </tr>
    </table></div>';
}
  $i++;
?>


Voila si quelqu'un pouvez m'aider je pense que je finirais mon jeu d'ici la semaine prochaine ;)

Ce message a été modifié par Total Manager - 17 juillet 2004 - 20:37.

Règle 1 : Le chef a Toujours RAISON
Règle 2 : Quand on est pas d'accord avec le chef se réferer à la règle 1 !
0

#2 L'utilisateur est hors-ligne   Jan 

  • Vainqueur du concours "Mangeur de Cigogne"
  • Groupe : Membre+
  • Messages : 2 278
  • Inscrit(e) : 07-décembre 03
  • Genre:Homme
  • Localisation:Toulouse
  • Société:Ma petite entreprise

Posté 17 juillet 2004 - 20:46

Essaye:
<?include ('secure.php');
$team =$_SESSION['club'];
require_once("fonctions.php");
connecting();
print'<div align="center"><img src="clubs/'.$_SESSION['club'].'.gif">';
print'<div align="center"><table border>
<tr>
   <td width="136" height="18"><p>Joueur</td>
   <td width="62" height="18"><p>Poste</td>
   <td width="90" height="18"><p>Gardien</td>
   <td width="68" height="18"><p>Defense</td>
   <td width="96" height="18"><p>Attaque</td>
</tr>';
$r=mysql_query ("SELECT * FROM joueurs WHERE club ='$team' ");
$nb=mysql_num_rows($r);
$i=0;
while($tableau=mysql_fetch_array($r) )
{
print'<tr>
       <td width="136" height="18"><p><a href="?page=option_joueur&id='.$tableau[id].'">'.$tableau[
nom].' 
           '.$tab[prenom].'</a></td>
       <td width="62" height="18"><p>'.$tableau[poste].'</td>
       <td width="90" height="18"><p>'.$tableau[gardien].'</td>
       <td width="68" height="18"><p>'.$tableau[defense].'</td>
       <td width="96" height="18"><p>'.$tableau[attaque].'</td>
   </tr>';
}
print'</table></div>';
 $i++;
?>

0

Partager ce sujet :


Page 1 sur 1
  • Vous ne pouvez pas commencer un sujet
  • Vous ne pouvez pas répondre à ce sujet

1 utilisateur(s) en train de lire ce sujet
0 membre(s), 1 invité(s), 0 utilisateur(s) anonyme(s)