Dreamweaver , regions repetés

Fermé
Lukaaaaa - 24 mai 2011 à 01:52
 lukaaaaa - 24 mai 2011 à 14:40
Bonjour,
Mon probleme est : J'ai créé une page ou j'affiche les resultats de ma page de donné , j'ai créé cette page , et j'ai ajouté un tableau normal , avec 2 colonnes et une ligne , j'ai fait en sorte que dans une colonne on affiche par exemple (id,img...) des trucs de la base de donné quoi , mais mon problème c'est que ces résultats s'affiche l'un a coté de l'autre et ça ne s'arrête jamais vu que ma region repeté et une colonne dans le tableau , la longueur de la page devient énorme , donc moi ce que je veux c'est que sur une ligne on n'affiche que 3 résultats puis on revient a la ligne et on affiche 3 et ainsi de suite :) , Merci j'ai vraiment besoin de votre aide ..


3 réponses

kadeh Messages postés 334 Date d'inscription vendredi 21 décembre 2007 Statut Membre Dernière intervention 15 novembre 2012 92
24 mai 2011 à 02:18
Bonjour,

pouvez-vous mettre le code source que vous utilisez pour afficher les données?
utilisez la balise code svp.
@+
0
<?php require_once('Connections/connector.php'); ?> 
<?php 
mysql_select_db($database_connector, $connector); 
$query_afficherresults = "SELECT * FROM vbysr_vidyo"; 
$afficherresults = mysql_query($query_afficherresults, $connector) or die(mysql_error()); 
$row_afficherresults = mysql_fetch_assoc($afficherresults); 
$totalRows_afficherresults = mysql_num_rows($afficherresults); 
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<title>Untitled Document</title> 
</head> 

<body> 
<table width="100%" border="0" cellspacing="1"> 
  <tr> 
    <?php do { ?> 
      <th width="11%" scope="col"><img src="miniature/<?php echo $row_afficherresults['video_link']; ?>.png" width="94" height="83" /></th> 
      <th width="11%" scope="col"><?php echo $row_afficherresults['video_title']; ?></th> 
      <?php } while ($row_afficherresults = mysql_fetch_assoc($afficherresults)); ?><th width="78%" scope="col"> </th> 
  </tr> 
</table> 
</body> 
</html> 
<?php 
mysql_free_result($afficherresults); 
?> 
0
<?php require_once('Connections/connector.php'); ?> 
<?php 
mysql_select_db($database_connector, $connector); 
$query_afficherresults = "SELECT * FROM vbysr_vidyo"; 
$afficherresults = mysql_query($query_afficherresults, $connector) or die(mysql_error()); 
$row_afficherresults = mysql_fetch_assoc($afficherresults); 
$totalRows_afficherresults = mysql_num_rows($afficherresults); 
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<title>Untitled Document</title> 
</head> 

<body> 
<table width="100%" border="0" cellspacing="1"> 
  <tr> 
    <?php do { ?> 
      <th width="11%" scope="col"><img src="miniature/<?php echo $row_afficherresults['video_link']; ?>.png" width="94" height="83" /></th> 
      <th width="11%" scope="col"><?php echo $row_afficherresults['video_title']; ?></th> 
      <?php } while ($row_afficherresults = mysql_fetch_assoc($afficherresults)); ?><th width="78%" scope="col"> </th> 
  </tr> 
</table> 
</body> 
</html> 
<?php 
mysql_free_result($afficherresults); 
?> 
0
kadeh Messages postés 334 Date d'inscription vendredi 21 décembre 2007 Statut Membre Dernière intervention 15 novembre 2012 92
24 mai 2011 à 04:59
si j'ai bien compris:
<table width="100%" border="0" cellspacing="1"> 
  <tr>
    <th width="11%" scope="col">Video Link</th>
    <th width="11%" scope="col">Video Title</th>
    <th width="78%" scope="col"></th>
  </tr>
  <?php 
  do { ?>
  <tr> 
    <td><img src="miniature/<?php echo $row_afficherresults['video_link']; ?>.png" width="94" height="83" /></td> 
    <td><?php echo $row_afficherresults['video_title']; ?></td>
    <td></td>
  </tr> 
  <?php 
  } while ($row_afficherresults = mysql_fetch_assoc($afficherresults)); 
  ?> 
</table>

@+
0
wai si tu veux
0