Se connecter avec
S'enregistrer | Connectez-vous

réduire taille tableau php

Dernière réponse : dans Programmation

Voila j'affiche la page suivante, le problème c'est qu'il y a trop d'espace entre les colonnes, et la derniere colonne est trop petite.

Peut t on donner une taille a chaque colonne, si oui comment.

Merci.

je voux montre la page en php :

<?php
mysql_connect("localhost", "root", ""); // Connexion à MySQL
mysql_select_db("ocsweb"); // Sélection de la base ocsweb

$reponse = mysql_query("SELECT * FROM bios, hardware, videos, networks Where bios.deviceid=hardware.deviceid And hardware.deviceid=videos.deviceid And videos.deviceid=networks.deviceid Order by hardware.namec"); // Requête SQL
?>
<div class="table" align="center">
<table class="tableListing" summary=" " cellspacing="0" cellpadding="3" border="1">
<tr>
<td>Nom machine</td>
<td>Utilisateur</td>
<td>Adresse IP</td>
<td>Numéro de série</td>
<td>Processeur</td>
<td>Carte vidéo</td>
<td>Carte réseau</td>
<td>Fabricant</td>
<td>Mémoire</td>
</tr>
</div>
<?php
while ($donnees = mysql_fetch_array($reponse))
{
echo "<tr>";
echo " <td class='tonStyleDeCellule'>".$donnees['NAMEC']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['USERID']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['IPADDR']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['SSN']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['PROCESSORS']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['NAME']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['DESCRIPTION']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['SMANUFACTURER']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['MEMORY']."</td>" ;
echo "</tr>";
}
?>
</table>

Autres pages sur : reduire taille tableau php

Lassé par la pub ? Créez un compte

Citation :

jpp13 a écrit :
Voila j'affiche la page suivante, le problème c'est qu'il y a trop d'espace entre les colonnes, et la derniere colonne est trop petite.

Peut t on donner une taille a chaque colonne, si oui comment.

Merci.

je voux montre la page en php :

<?php
mysql_connect("localhost", "root", ""); // Connexion à MySQL
mysql_select_db("ocsweb"); // Sélection de la base ocsweb

$reponse = mysql_query("SELECT * FROM bios, hardware, videos, networks Where bios.deviceid=hardware.deviceid And hardware.deviceid=videos.deviceid And videos.deviceid=networks.deviceid Order by hardware.namec"); // Requête SQL
?>
<div class="table" align="center">
<table class="tableListing" summary=" " cellspacing="0" cellpadding="3" border="1">
<tr>
<td>Nom machine</td>
<td>Utilisateur</td>
<td>Adresse IP</td>
<td>Numéro de série</td>
<td>Processeur</td>
<td>Carte vidéo</td>
<td>Carte réseau</td>
<td>Fabricant</td>
<td>Mémoire</td>
</tr>
</div>
<?php
while ($donnees = mysql_fetch_array($reponse))
{
echo "<tr>";
echo " <td class='tonStyleDeCellule'>".$donnees['NAMEC']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['USERID']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['IPADDR']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['SSN']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['PROCESSORS']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['NAME']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['DESCRIPTION']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['SMANUFACTURER']."</td>" ;
echo " <td class='tonStyleDeCellule'>".$donnees['MEMORY']."</td>" ;
echo "</tr>";
}
?>
</table>




Salut,
Oui biensur c'est possible tu rajoutes les attributs heigth et width dans les balises de colonnes :) 


Cordialement S62.
Lassé par la pub ? Créez un compte
Tom's guide dans le monde