<?php
// ------------------------------------------------------------------------- //
// Visualiser sa BDD. //
// ------------------------------------------------------------------------- //
// Auteur: Francois //
// Email: gdljbox@hotmail.com //
// Web: //
// ------------------------------------------------------------------------- //
$bdd = "Nom_de_la_base_de_données";
$nbTablesParLigne = 4;
$mysql_link = mysql_connect("localhost","root","");
mysql_select_db($bdd,$mysql_link);
$query = "SHOW TABLES FROM $bdd";
$result = mysql_query($query,$mysql_link);
$i=0;
echo "<table border=1 cellpadding=8>\n<tr>\n";
while ($row = mysql_fetch_row($result))
{
$i++;
echo "<td width=".intval(100/$nbTablesParLigne)."% valign=\"top\">";
echo "<b><center><font size=+2>$row[0]</font></center></b><br>";
$query = "DESC $row[0]";
$resultTable = mysql_query($query,$mysql_link);
echo "<table width=100%cellpadding=5 cols=3>";
while ($row2 = mysql_fetch_row($resultTable))
{
echo "<tr><td>$row2[0]</td><td width=10></td><td align=right>";
echo "<i>$row2[1]</i></td></tr>";
}
echo "</table>";
echo "<br></td>\n";
if (is_int($i/$nbTablesParLigne))
echo "</tr>\n<tr>";
}
while (!is_int($i/$nbTablesParLigne))
{
echo "<td> </td>";
$i++;
}
echo "</tr>\n</table>";
?>